/*
   Author:Man_Ray
   For:nFactorial School
   Time: 17:19

*/

#include <bits/stdc++.h>
#define forn(i,l,r,x) for(int i=(l);i<=(r);i+=x)
#define forr(i,l,r,x) for(int i=(l);i>=(r);i-=x)
#define pb push_back
#define pf push_front
#define ll long long
#define all(x) x.begin(),x.end()
#define sr(a) sort(a+1,a+n+1)
#define ins insert
#define F first
#define S second
#define pii pair<ll,int>
#define yes cout<<"DA"<<'\n';
#define no cout<<"NE"<<'\n';
#define sz(s) s.size()
#define int ll
#define level_up ios::sync_with_stdio(false);cin.tie(nullptr);cout.tie(nullptr);

#pragma GCC target ("avx2")
#pragma GCC optimization ("O3")
#pragma comment (linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target ("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")

using namespace std;

void file(string s) {
    freopen((s+".in").c_str(),"r",stdin);
    freopen((s+".out").c_str(),"w",stdout);
}

const double PI = 3.1415926535897932384626433832795;
const int MOD = 1e9 + 7;
const int N = 1e6 + 7;
int inf = INT_MAX;

void run_case() {

    double n,m,k;

    cin >> n >> m >> k;

    int a1=ceil(n/k);
    int a2=ceil(m/k);

    int ans=max(1ll,a1)*max(1ll,a2);

    cout<<ans;
}

main () {

    level_up;

    //file("sparse");

    int T=1;

    //cin >> T;

    while(T--) {
        run_case();
    }
}
/*

acbdbca

*/