#include <iostream>
using namespace std;

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

    long long x = (n + k - 1) / k; 
    long long y = (m + k - 1) / k; 
    long long result = x * y;

    cout << result << endl;

    return 0;
}