#include <iostream>
using namespace std;
int main() {
    long int m, n, k;
    cin >> m >> n >> k;

    long int l = (m + k - 1) / k * ((n + k - 1) / k);

    cout << l << endl;

    return 0;
    
}