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

#define int long long
#define vi vector <int>
#define speed ios::sync_with_stdio(false), cin.tie(0), cout.tie(0)

signed main(){
	speed; int n, m, k;
	cin >> n >> m >> k;
	if (n % k != 0){
		n += k - (n % k);
	}
	if (m % k != 0){
		m += k - (m % k);
	}
	cout << n * m / (k * k);
	
}
