//#pragma GCC optimize("0fast")
//#pragma GCC optimize("popcnt, bm2")

#include <bits/stdc++.h>
#include<ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace std;

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr); cout.tie(nullptr);
//    freopen("input.txt", "r", stdin);
//    freopen("output.txt", "w", stdout);
    int n, m, k;
    cin >> n >> m >> k;
    cout << (((n + k - 1) / k) * ((m + k - 1) / k));
    return 0;
}
