#include <bits/stdc++.h>
#define ll long long
using namespace std;
int main(){
    ll n,m,k;
    cin>>n>>m>>k;
    ll ans=1;
    ll ans1=n/k;
    ll ans2=m/k;
    if(n%k!=0){
        ans1++;
    }
    if(m%k!=0){
        ans2++;
    }
    cout<<ans1*ans2;
}

