#include <bits/stdc++.h>

using namespace std;

using ll = long long;

void solve()
{
    ll n, m, k;
    cin >> n >> m >> k;
    cout << ((n - 1) / k + 1) * ((m - 1) / k + 1);
}

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    //freopen("input.txt", "r", stdin);
    ll t = 1;
    //cin >> t;
    for(ll i = 0; i < t; i++)
    {
        solve();
    }
    return 0;
}
