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

int main() {
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	ll n, m, k;
	cin >> n >> m >> k;
	ll x = (n + k - 1) / k;
	ll y = (m + k - 1) / k;
	cout << x * y;
}
