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