
#include <iostream>

using namespace std;
int main()
{
    int n, m, k, x, y;
    cin >> n >> m >> k;
    if (n % k == 0) x = n / k;
    else x = n / k + 1;
    if (m % k == 0) y = m / k;
    else y = m / k + 1;
    cout << x*y;
     
            return 0;
}