#include <bits/stdc++.h>
#define ll long long
#define all(a) a.begin(), a.end()
#define F first
#define S second
#define pb push_back
#define eb emplace_back
#define ull unsigned long long
#define ld long double
#define files freopen("HelpMe.in", "r", stdin), freopen("HelpMe.out", "w", stdout)
using namespace std;
const ll mod = 1e9+7;
const ll N = 2e5 + 5;
const ll P = 337ll;
const ld EPS = 1e-9;
const ll block = 400;
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
ll n,m,k;
cin>>n>>m>>k;
ll tmp1 = (n/k) + (n%k!=0), tmp2 = (m/k) + (m%k!=0);
cout<<tmp1*tmp2;
return 0;
}
// equal, min, max, 1, random
/*
******
******
******
******
******
******
*/
