#include<bits/stdc++.h>
#define int int64_t
using namespace std;
int32_t main(){
    #ifdef LOCAL
        freopen("input.txt","r",stdin);
        freopen("output.txt","w",stdout);
    #endif // LOCAL
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    int n,m,k;
    cin >> n >> m >> k;
    cout << ((n / k) + (n % k != 0)) * (m / k + (m % k != 0)) << '\n';
    return 0;
}
