///Shapo4ka
#include <bits/stdc++.h>
#define fi first
#define se second
#define pb push_back

using namespace std;

typedef long long ll;
typedef long double ld;

typedef pair<int,int> pii;
typedef pair<ll,ll> pll;

typedef vector<int> vii;
typedef vector<ll> vll;

ll bpow(ll a, int n)
{
    ll ans=1;
    while(n)
    {
        if (n & 1)ans*=a;
        a*=a;
        n/=2;
    }
    return ans;
}

int main()
{
    ll a, b, k;
    cin >> a >> b >> k;


    cout << (a+k-1)/k*((b+k-1)/k);
    return 0;
}
/*
10 9 3
*/
