#include <iostream>
#include <cmath>

using namespace std;

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

    int lampsWidth = ceil((double)n / k);
    int lampsLength = ceil((double)m / k);
    int totalLamps = lampsWidth * lampsLength;

    cout << totalLamps << endl;

    return 0;
}