#include <bits/stdc++.h>

using namespace std;
#define ll long long
int main()
{
    ll a, b, k;
    cin >> a >> b >> k;
    ll k0 = a % k > 0;
    ll k1 = b % k > 0;
    ll o = (a/ k + k0) * (b / k + k1);
    cout << o << endl;
}
