#include <iostream>
using namespace std;

int main()
{
    int m, n, k;
	cin >> m >> n >> k;
	int ans = 0, f = 0;
	ans = m / k;
	f = n / k;
	if (m % k > 0)	ans++;
	if (n % k > 0)	f++;
	cout << ans * f;
}
