#include <iostream>
#define int long long
using namespace std;
int ceil(int a, int b) {
    return a / b + (a % b != 0);
}
signed main() {
#ifdef LOCAL
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
    int n, m, k;
    cin >> n >> m >> k;
    cout << ceil(n, k) * ceil(m, k);
    return 0;
}
