#include <bits/stdc++.h>
#pragma GCC optimize("O3,unroll-loops")
#pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt")
#define speed ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define ll long long
#define F first
#define S second
using namespace std;
const int SIZE = 2e5 + 5;
const ll mod = 1e9 + 7;

ll n, m, k;

void solve() {
    cin >> n >> m >> k;

    ll ans = ((n + k - 1) / k) * ((m + k - 1) / k);
    cout << ans;
    return;
}

int main() {
    speed;

	int TIME;
	TIME = 1;
	//cin >> TIME;
	while (TIME-- > 0) {
		solve();
		cout << "\n";
	}
	return 0;
}
