#include <bits/stdc++.h>
using namespace std;
#define ll long long

signed main () {
    ll n, m, k;
    cin >> n >> m >> k;
    ll x=n/k, y=m/k;
    if (n%k>0) x++;
    if (m%k>0) y++;
    cout << x*y;
}