// BEST TEACHERS: NAZAROV SHARAF and USMONZODA SOMON
//                littbird           another_love
#include <bits/stdc++.h>
 #define ONLINE_JUDGE
#define fi first
#define se second
#define pb push_back
#define yes cout << "YES"
#define no cout << "NO"
#define int long long
#define in insert
#define endl '\n'
#define ld long double
#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()
using namespace std;
void solve() {
    int n,m,k;
    cin >> n >> m >> k;
    int l = 0, r = 1e9;
    cout << (n + k - 1) / k * ((m + k - 1) / k);
    // while (l + 1 < r) {
    //     int m = (l + r) / 2;
    //     if( (n + k - 1) / k * ((m + k - 1) / k) ) r = m;
    //     else l = m;
    // }
    // cout << r;
    
}
signed main() {
#ifndef ONLINE_JUDGE
    // For getting input from input.txt file
    freopen("input.txt", "r", stdin);
    // Printing the Output to output.txt file
    freopen("output.txt", "w", stdout);
#endif
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    int tt = 1;
   // cin >> tt;
    for (int q = 1; q <= tt; q++) {
        solve();
        cout << endl;
    }
}
