#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n, m, k;
    cin >> n >> m >> k;
    if (n % k == 0 && m % k == 0)
        cout << (n * m) / (k * k);
    else if (m % k)
        cout << (n * m - k) / (k * k) + m / k;
    else
        cout << (n * m - k) / (k * k) + n / k;
    return 0;
}

