#include <bits/stdc++.h>
using namespace std;
void solve(){
	long long n, m, k;
	cin >> n >> m >>k;
	unsigned long long ans=ceil(n/(double)k)*ceil(m/(double)k);
	cout <<  ans;
}
int main(){
	int t=1;
	//cin >> t;
	while(t--){
		solve();
	//	cout<<"\n";
	}
	return 0;
}
