#include<bits/stdc++.h>
#define ll long long
#define N 1e6
#define NN 1e9
#define pb push_back
#define pp pop_back
//mda
using namespace std;
int main(){
ios_base::sync_with_stdio(0);
cin.tie(0);cout.tie(0);
int m,n,k,m1,n1;
cin>>n>>n>>k;
if(m%k!=0){
  m1++;
}
if(n%k!=0){
  n1++;
}
m1+=m/k;
n1+=n/k;
cout<<n1*m1;
  }