/*
	Created ny exypn0x
	28.08.2023
	nisfmn.contest.codeforces.com [day 5]
*/
 
#include <bits/stdc++.h>
#define ll long long
#define vi vector<int>
#define pb push_back
#define pp pop_back
#define bg begin
#define vll vector<long long>
#define fi first
#define sc second
#define vc vector<char>
#define pi pair<int,int>
#define pic pair<int,char>
#define ull unsigned long long
#define vull vector<unsigned long long>
#define uint unsigned int
#define pb push_back
#define pp pop_back

#define speed ios_base::sync_with_stdio(0);cin.tie(NULL);
using namespace std;

void solve() {
	speed;
	ll n,m,k;
	cin>>n>>m>>k;
	ll x,y;
	x = (n + k-1)/k;
	y = (m+k-1)/k;
	cout<<x*y<<endl;
}

int main() {
	solve();
	return 0;
}
