#include  <bits/stdc++.h>
#include  <math.h>
#include  <cmath>
#include  <string>
#include  <vector>
#include  <map>
#include  <algorithm>


#define ll       long long int
#define ld       long double
#define ull      unsigned long long int
#define pb       push_back
#define pf       push_front
#define en       cout<<endl;
#define yes      cout<<"YES"<<endl;
#define no       cout<<"NO"<<endl;
#define no1      {cout<<-1<<endl; r0}
#define no0      {cout<<0<<endl; r0}
#define yes_r    { cout<<"YES"<<endl; return ; }
#define no_r     { cout<<"NO"<<endl; return ; }
#define r0       return ;
#define fr       first
#define sc       second
#define TT       ll tt;cin>>tt;while(tt--)
#define No       cout << "No" << endl ;
#define vl       vector<ll>

using namespace std ;
int main()
{
     ios_base::sync_with_stdio(false) ;
     cin.tie(NULL) ;
      cout.tie(NULL) ;
    ll a1, b1, a, cnt = 1;
    cin >> a1 >> b1 >> a;
    if(a1 > a)
        cnt*=(a1 + a - 1)/a;
    if(b1 > a)
        cnt*=(b1 + a - 1)/a;
    cout << cnt;
}

