#include <iostream>

using namespace std;

int main() {
    long long n, m, k;
    cin >> n >> m >> k;

    long long l_n = (n + k - 1) / k;  
    long long l_m = (m + k - 1) / k;  

    long long t_l = l_n * l_m;

    cout << t_l << endl;

    return 0;
}
