#include <iostream>

using namespace std;

int main()
{
    int n, m, k;
    cin >> m;
    cin >> n;
    cin >> k;
    cout << ((m/k) + (m%k ? 1 : 0)) * ((n/k) + (n%k ? 1 : 0)) << endl;
    return 0;
}
