#include <iostream>
using namespace std;

int main() {
    long long n, m, k;
    cin >> n >> m >> k;

    long long numN = (n + k - 1) / k; 
    long long numM = (m + k - 1) / k; 

    long long total = numN * numM; 
    cout << total << endl;

    return 0;
}
