#include <bits/stdc++.h>
#define ll long long
#define int ll
#define itn int
#define sz(x) (x).size() 
#define all(x) (x).begin(), (x).end() 
#define pb push_back 
#define sonic ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
//const int MAX=2e17+5;
//const int abi=1e6+5;
using namespace std;  
int n,t=1;
void x( ){
    int x,y,k;
    cin>>x>>y>>k;
    int sum1=(x+(k-1))/k;
    int sum2=(y+(k-1))/k;
    cout<<sum1*sum2;
}signed main(){sonic 
    //cin>>t; 
    while(t--){ 
    x();
    }
    return 0; 
}