#include <bits/stdc++.h>

using namespace std;

using ll = long long;
using ld = long double;
using ull = unsigned long long;
using vi = vector<ll>;
using vvi = vector<vi>;
using pi = pair<ll, ll>;
using vpi = vector<pi>;
const ll inf = 998244353;

void solve() {
    ll m, n, k;
    cin >> m >> n >> k;
    cout << ((m + k - 1) / k)  * ((n + k - 1) / k) << '\n';
}

int main() {
    int k = 1;
    //cin >> k;
    for (int i = 0; i < k; ++i) {
        solve();
    }
}
