#include<bits/stdc++.h>
#define FAST ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
#define int long long
#define ll long long
#define con continue
#define fir first
#define sec second
#define yes cout<<"YES"<<endl;
#define no cout<<"NO"<<endl;
#define rev reverse
#define pb push_back
#define ppb pop_back
#define pf push_front
#define ppf pop_front
#define endl "\n"
using namespace std;
main()
{
//    FAST
    int n,m,k;
    cin>>n>>m>>k;
    cout<<((n+k-1)/k)*((m+k-1)/k)<<endl;
}
