#include<iostream>
#include<vector>
#include<string>	
#include<map>
#include<set>
#include<queue>
#include<deque>
#include<iomanip>
#include<cmath>
#include<algorithm>
#include<cstdio>
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
using namespace std;
using ll = long long;
using ld = long double;
using ull = unsigned long long;
ll gcd(ll a, ll b) {
	if (b == 0) {
		return a;
	}
	return gcd(b, a % b);
}
ll lcm(ll a, ll b) {
	return a / gcd(a, b) * b;
}

//=================================



//vector<string> a;
//vector<vector<bool>> b;
//bool is(int x, int y, bool t) {
//	for (int i = x - 1; i <= x + 1; ++i) {
//		for (int j = y - 1; j <= y + 1; ++j) {
//			if (i < 0 || i > 7 || j < 0 || j > 7) {
//				cout << "NO";
//				exit(0);
//			}
//		}
//	}
//}
//
//int ship(int x, int y) {
//
//}

void solve() {
	// A;
	ll n, m, k;
	cin >> n >> m >> k;
	cout << (n + k - 1) / k * ((m + k - 1) / k);
	// B;
	/*a.resize(10);
	b.resize(10, vector<bool>(10));
	map<int, int> c;
	for (auto& i : a) cin >> i;
	for (int i = 0; i < 10; ++i) {
		for (int j = 0; j < 10; ++j) {
			if (a[i][j] == '#' && !b[i][j]) {
				c[ship(i, j)]++;
			}
		}
	}*/
}

//=================================

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

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