#include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define ld long double
#define fir first
#define sec second
#define all(x) x,begin(),x.end()
#define mp make_pair
using namespace std;
void solve(){
ll n,m,k;
cin >> n >> m >> k;
ll n1,m1;
if(n%k>0) n1=n/k+1;
else n1=n/k;
if(m%k>0) m1=m/k+1;
else m1=m/k;
cout << m1*n1;
}

int main()
{
    solve();
    return 0;
}
