#include "bits/stdc++.h"

using namespace std;

void solve(){
    long long n,m,k;
    cin >> n >> m >> k;

    cout << ((n + k - 1) / k) * ((m + k - 1) / k);
}

signed main() {
#ifdef LOCAL
    freopen("input.txt","r",stdin);
    freopen("output.txt","w",stdout);
#else
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);
#endif
    int t = 1;
//    cin >> t;

    while (t--) solve();
}
