#include <bits/stdc++.h>
#define ll long long
#define speed ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0)
#define pb push_back


using namespace std;


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