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