#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ull unsigned long long

void io(){
    freopen("input.txt" , "r" , stdin);
    freopen("output.txt" , "w" , stdout);
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    cout.setf(ios::fixed);
    cout.precision(10);
}

void solve(){
    float n,m,k;
    cin>>n>>m>>k;
    n=  ceil(n/k);
    m= ceil(m/k);
    cout<<n*m;
    return;
}

int main(){
    //io();
    int t=1;
    //cin>>t;
    for(int i=0;i<t;i++){
        solve();
        cout<<"\n";
    }
    return 0;
}