#include <iostream>
#include <cmath>
using namespace std;
int main() {
    long long n, m, k;
    cin >> n >> m >> k;

    long long r = (n + k - 1) / k; 
    long long c = (m + k - 1) / k; 

    long long t = r * c;
    cout << t << endl;

    return 0;
}
