#include <bits/stdc++.h>

#define int long long
#define pii pair<long long, long long>
#define ios_boost \
    cin.tie(0);   \
    ios_base::sync_with_stdio(0)

using namespace std;

signed main() {
    ios_boost;

    int n, m, k;
    cin >> n >> m >> k;
    cout << ((n + k - 1) / k) * ((m + k - 1) / k);
}