#include <iostream>
#include <cmath>

using namespace std;

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);

    double n, m, k;
    cin >> n >> m >> k;

    auto res = ceil(n / k) * ceil(m / k);
    cout << (long long) res;
    return 0;
}