#pragma GCC optimize("Ofast,unroll-loops")
#pragma GCC target("sse,sse2,sse3,sse4,sse4.1,sse4.2,abm,bmi,bmi2,popcnt,lzcnt,avx,avx2,fma")
#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <stack>
#include <vector>
#include <string>
#include <algorithm>
#include <map>
#include <set>
#include <queue>
#include <cmath>
#include <time.h>
#include <deque>
using namespace std;
using loh = long long; // loh
using lohd = long double; // short (4bite) // dolik loh

int main () {
	loh a, b, c, sum1 = 0, sum2 = 0;
	cin >> a >> b >> c;
	if (a % c != 0) {
		sum1++;
	}
	if (b % c != 0) {
		sum2++;
	}
	cout << ((a / c) + sum1) * ((b / c) + sum2);
}