#include <iostream>

using namespace std;

int main() {
    int n, m, k;
    cin >> m >> n >> k;
    int a = m/k, b = n/k;
    if(m%k!=0)
        a++;
    if(n%k!=0)
        b++;
    cout << 1ll*a*b;
    
    return 0;
}