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

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