#include <bits/stdc++.h>
#define int long long
using namespace std;
void solve(){
    int a, b, c;
    cin>>a>>b>>c;
    int s, ss;
    if(a%c!=0)s=a/c+1;
    else s=a/c;
    if(b%c!=0)ss=b/c+1;
    else ss=b/c;
    cout<<s*ss;
}

main(){
    ios::sync_with_stdio(0);
    cin.tie(0);cout.tie(0);
    int t=1;
    while(t--)solve();
}
