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