#include <bits/stdc++.h>
#define int long long
using namespace std;
int n, m, k, i;

signed main() {
	cin.tie(0)->sync_with_stdio(0);
	cin >> n >> m >> k;
	cout << ((n + k - 1) / k) * ((m + k - 1) / k);
}