#include <bits/stdc++.h>
using namespace std;

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