#include <iostream>
#include <string>
#include <cmath>
using namespace std;

int main() {
    string n, m, k;
    cin >> n >> m >> k;
    if (stoi(n) % stoi(k) != 0) {
        if (stoi(m) % stoi(k) < 0) {
            cout << (stoi(n) / stoi(k) + 1) * (stoi(m) / stoi(k) + 1) << endl;
        } else {
            cout << (stoi(n) / stoi(k) + 1) * (stoi(m) / stoi(k)) << endl;
        }
    } else {
        if (stoi(m) % stoi(k) < 0) {
            cout << stoi(n) / stoi(k) * (stoi(m) / stoi(k) + 1) << endl;
        } else {
            cout << stoi(n) / stoi(k) * (stoi(m) / stoi(k)) << endl;
        }
    }
    return 0;
}
