#include <iostream>
using namespace std; 

int main() {
int n,m,k,amount;
cin>>n;
cin>>m;
cin>>k;
  int area1=n*m;
  int area2 =k*k;
  if(m%k==0 && n%k!=0 && m/k==2){
     amount =(m/k)+(m/k);
    cout<<amount;
  }
  if(n%k==0 && m%k!=0 && n/k==2){
    amount =(n/k)+(n/k);
    cout<<amount;
  }
  if(m%k==0 && n%k==0){
    amount = area1/area2;
  cout<<amount;
  }
  if(m%k!=0 && n%k==0 && n/k!=2){
    amount =(n/k)*(m/k + 1);
    cout<<amount;
  }
  if(n%k!=0 && m%k==0 && m/k!=2){
    amount =(m/k)*(n/k + 1);
    cout<<amount;
  }
  if(m%k!=0 && n%k!=0){
   amount =(m/k+1)*(n/k+1);
    cout<<amount;
  }
}