#include <bits/stdc++.h>
using namespace std;

    typedef long long ll;
    typedef long double ld;

void solve() {
    ll n, m, k;
    cin >> n >> m >> k;
    ll f1 = n / k;
    if (n % k) f1++;
    ll f2 = m / k;
    if (m % k) f2++;
    cout << f1 * f2 << '\n';
}

signed main() {
    ios::sync_with_stdio(0);
    cout.tie(0);
    cin.tie(0);

    int t = 1;
    //cin >> t;

    while (t--) {
        solve();
    }
}
