#include <bits/stdc++.h>
using namespace std;
int main (){
	long long n, m, k;
	cin >> n >> m >> k;
	cout << ceil((double long)n / (double long)k) * ceil((double long)m / (double long)k);
return 0;	
}
