#include <iostream>
using namespace std;
int main() {
    int n, m, k;
    cin >> n >> m >> k;
    while(n%k != 0){
        n++;
    }
    while(m%k != 0){
        m++;
    }
    int i = (n*m)/(k*k);
    cout << i;

    return 0;
}
