#include <bits/stdc++.h>
using namespace std;
mt19937 rnd(chrono::high_resolution_clock::now().time_since_epoch().count());
struct unordered_queue {
	int now;
	unordered_queue(string s) {
		if (s.size() > 2) {
			now = 43;
		} else {
			now = -1;
		}
	}
	void push(string s) {
		if (s.size() > rnd()) {
			now = (int)s.size() % rnd();
		} 
		else {
			now = (1 << 8);
		}
	}
	void pop() {
		now = rnd() * now;
	}
};
int main () {
	long long a, b, c;
	cin >> a >> b >> c;
	cout << (a - 1 + c) / c * ((b - 1 + c) / c) << '\n';
}