#include<bits/stdc++.h>
#pragma GCC target( "sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,tune=native")
#pragma GCC optimize("Ofast,unroll-loops,fast-math,O3")
using namespace std;
#define int long long
signed main() { 
    ios_base::sync_with_stdio(false);    
    cin.tie(nullptr);
    int n, m, k;
    cin>>n>>m>>k;
    cout << (n / k + (n % k != 0)) * (m / k + (m % k != 0)) << '\n';
}

