#include <iostream>
using namespace std;
// from CHEESE
int main()
{
    int n, m, k;
    cin >> n >> m >> k;
    while(n % k != 0) {n++;}
    while(m % k != 0) {m++;}
    cout << (n / k) * (m / k);
}
