#include<bits/stdc++.h>
using namespace  std;
#define ll long long int
#define pb push_back 
#define IShowSpeed ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
const int N=2e5+100;
const int mod=1e9+7;

int main()
{
	ll n,m,k;
	cin>>n>>m>>k;
	int x=0,y=0;
	if(n%k!=0) x=1;
	if(m%k!=0) y=1;
	cout<<(n/k+x)*(m/k+y);
}