#include <iostream>
#include<vector>
#include<algorithm>
#include<iomanip>
#include<fstream>
#include<string>
#include<random>
#include<cmath>
#include<ctime>
#include<set>
#include<map>
#define pll pair<ll,ll>
#define all(v) v.begin(),v.end()
typedef long long ll;
using namespace std;
void solve();
int main()
{
	cin.tie(0)->sync_with_stdio(0);
	solve();
	return 0;
}

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