#include <iostream>
using namespace std;

#define ll long long
#define fi first
#define se second
#define sz size()
#define pb push_back()

int main(){
    ll n,m,k;
    cin>>n>>m>>k;
    ll ans=m/k;
    if(m%k!=0)
        ans++;
    ll d = n/k;
    if(n%k!=0)
        d++;
    cout<<ans*d;
}
