#include <iostream>

using namespace std;

int main() {
    long long n, m, k;
    cin >> n >> m >> k;
    long long lampsAlongN = (n + k - 1) / k;
    long long lampsAlongM = (m + k - 1) / k;
    long long totalLamps = lampsAlongN * lampsAlongM;

    cout << totalLamps << endl;

    return 0;
}

