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

void solve() {
	long long n, m, k;
	cin >> n >> m >> k;
	cout << ((n+k-1)/k)*((m+k-1)/k);
}

signed main() {
    ios::sync_with_stdio(false);
    cin.tie(NULL);
    int tests = 1;
    // cin >> tests;
    while (tests--) {
    	solve();
	}
    return 0;
}
