#include <iostream>

using namespace std;

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

    if (n % k != 0)
        a = n / k + 1;
    else
        a = n / k;

    if (m % k != 0)
        b = m / k + 1;
    else
        b = m / k;

    cout << a * b;

    return 0;
}