#include <bits/stdc++.h>
using namespace std;

int main() {
	int n, m, k, res = 0;
	cin >> n >> m >> k;
	
	if (n % k != 0) n += k;
	if (m % k != 0) m += k;
	
	res = (m / k) * (n / k);

	cout << res;
	
}
