#include <iostream>
#include <cmath>
using namespace std;
int main()
{
    long long n, m, k;
    cin >> n >> m >> k;
    cout << ceil(((long double)m / k)) * ceil(((long double)n / k));
    return 0;
}
