#include <bits/stdc++.h>

using namespace std;

#define int long long

signed main() {
    int n, m, k; cin >> n >> m >> k;
    int res1, res2;
    if (n%k!=0) {
        res1=n/k+1;
    }
    else {
        res1=n/k;
    }
    if (m%k!=0) {
        res2=m/k+1;
    }
    else {
        res2=m/k;
    }
    cout<<res1*res2;
}
