#include <bits/stdc++.h>
#define int long long
#define iphone ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0)
#define endl cout<<endl
using namespace std;
void solve(){
    int n,m,a,ans=1;
    cin>>n>>m>>a;
    if (n>a) ans*=(n+a-1)/a;
    if (m>a) ans*=(m+a-1)/a;
    cout<<ans;
}
signed main()
{
    iphone;
    solve();
}
