#include <bits/stdc++.h>
using namespace std;
 
int main() {
    int m, n, k;
    cin >> m >> n;
    cin >> k;
    int countX = m / k; 
    int countY = n / k;
    if (m % k != 0) {
        countX++;
    }
    if (n % k != 0) {
        countY++;
    }
    int total = countX * countY;
    if(total == 0)
    cout << '1';
	else
    cout << total;
    return 0;
}
