#include <iostream>
#include <cmath>
#include <map>
#include <vector>
#include <algorithm>
#include <time.h>
#include <queue>
#include <unordered_set>
#include <fstream>
#include <set>
#include <unordered_map>

using namespace std;
#define ll long long

ll binpow (ll a, ll n) {
	ll res = 1;
	while (n) {
		if (n & 1)
			res = res * a;
		a = a * a;
		n >>= 1;
	}
	return res;
}


void fc (){
	ll n,m,k;
	cin>>n>>m>>k;
	ll a=n/k,b=m/k;
	if (n%k!=0){
		a++;
	}if (m%k!=0){
		b++;
	}
	cout<<a*b;
	
}


int main (){
	
	
	int T=1;
	//cin>>T;
	while (T--)  fc();
  
  
  
}
