#include <bits/stdc++.h>

using namespace std;

#define ll long long

ll n, m, k;

void solve(){
	cin >> n >> m >> k;
	ll x = (n + k - 1) / k; 
	ll y = (m + k - 1) / k;
	cout << x * y;
}

signed main(){
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
	solve();
	return 0;
}