#include <bits/stdc++.h>

using namespace std;

int a, b, c;

int main(){
    cin >> a >> b >> c;
    int k, l;
    if(a % c == 0) k = a / c;
    if(a % c != 0) k = a / c + 1;
    if(b % c == 0) l = b / c;
    if(b % c != 0) l = b / c + 1;
    cout << k * l;
}
