#include <iostream>
using namespace std;
int main()
{
    long long n, m, k;
    cin >> n >> m >> k;
    if (k < 0 || n < 0 || m < 0)
    {
        cout << "error" << endl;
    }
    if (k > 1000000000 || n > 1000000000 || m > 1000000000)
    {
        cout << "error" << endl;
    }
    long long horiz_lamp = m / k;
    long long vertic_lamp = n / k;
    long long lamp_left = 0;
    if (m % k != 0)
    {
        lamp_left += vertic_lamp;
    }
    else if (n % k != 0) 
    {
        lamp_left += horiz_lamp;
    }
    else if (m % k != 0 && n % k != 0) 
    {
        lamp_left = lamp_left - 0;
    }
    long long lamp_total = horiz_lamp * vertic_lamp + lamp_left;
    cout << lamp_total;

}
