#include<bits/stdc++.h>

using namespace std;

int main() {
    long double n, m, k, s, s1;
    cin >> n >> m >> k;
    s = (n / k);
    s1 = (m / k);
    if (s != int(s)) {
        s = int(s) + 1;
    }
    if (s1 != int(s1)) {
        s1 = int(s1) + 1;
    }
    cout << s * s1;
}
