#include<bits/stdc++.h>
using namespace std;
int main()
{
	long long n, m, k;
	cin >> n >> m >> k;
	long long nk = n / k, mk = m / k;
	if (n % k != 0)
		nk++;
	if (m % k != 0)
		mk++;
	unsigned long long kol=nk*mk;
	cout << kol;
return 0;
}