#include <bits/stdc++.h>
#define int long long
using namespace std;
main()
{
    // freopen("prices.in", "r", stdin);
    // freopen("prices.out", "w", stdout);
    ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
    int tests = 1;
//    cin >> tests;
    while (tests--){
        int n, m, k;
        cin >> n >> m >> k;
        n = (n + k - 1) / k;
        m = (m + k - 1) / k;
        cout << n * m;
    }
}
