#include <bits/stdc++.h>

using namespace std;

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