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