#include<iostream>
#include<vector>
#include<map>
#include<set>
#include<algorithm>
#include<iomanip>
using namespace std;
using ll = long long;
using db = double;

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

int main()
{
	cin.tie(0)->sync_with_stdio(0);
	cout.tie(0)->sync_with_stdio(0);
	int t = 1;
	//cin>>t;
	while (t--) {
		solve();
	}
}
