#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define all(x) x.begin(),x.end()
#define rall(x) x.rbegin(),x.rend()
template<class T> istream& operator>>(istream& is, vector<T>& arr) { for(auto& i:arr) is>>i; return is;}
template<class T> ostream& operator<<(ostream& os, vector<T>& arr) { for(auto& i:arr) os<<i<<" "; return os;}



signed main()
{
ios_base::sync_with_stdio(0);
cin.tie(0);

ll n,m,k;
cin>>n>>m>>k;

ll w= (n+k-1)/k;
ll h= (m+k-1)/k;

cout<<w*h<<endl;
return 0;
}
