//                   LETS GOOOOOOOOO
#include <bits/stdc++.h>
using namespace std;

#define sz size
#define all(n) n.begin(),n.end()
#define ull unsigned long long
#define ll long long
#define ld long double
#define pb push_back
#define pf push_front
#define pii pair<int, int>
#define pll pair<ll, ll>
#define pdd pair<double, double>
#define len length
#define yes cout<<"YES\n"
#define up upper_bound
#define lb lower_bound
#define no cout<<"NO\n"
#define delb pop_back
#define F first
#define S second
#define sled "\n"
#define vi vector<int>
#define vll vector<long long>
#define gcd __gcd
#define emp empty
#define startt ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define delenie cout<<"\n=========\n"
#define in insert
#define mp make_pair

const long long MOD1=998244353;
const long long MOD2=1e9+7;
const long double Eps = 1e-12;
const int max1 = 1e9*1.4; 
const int min1 = -1e9 *1.4; 
const int mod = 1e9 + 7;
const int N = 2e5 + 100;
const int B = 1e6*2 + 100;
const ll INF = 1e18 + 100;
const int G=1e2+2;

void solve(){
	int n;
	cin>>n;
	int m;
	cin>>m;
	int k;
	cin>>k;
	cout <<((n+k-1)/k) * ((m+k-1)/k);
}

int main (){
    startt;
	solve();
}
