#include <iostream>
#include <math.h>
using namespace std;

int main(){
    int n,m,k;
    cin>>n>>m>>k;
    int a=n/k,b=m/k;
    if(n%k>0) a=n/k+1;
    if(m%k>0) b=m/k+1;
    cout<<a*1ll*b;
    return 0;
}