#include <bits/stdc++.h>
using namespace std;
using ll = long long;
mt19937_64 rnd(time(0));
#define push_back pb
#define make_pair mp
#define F first
#define S second
#define all(x) x.begin(), x.end()

const ll N = 2e5 + 5;
const ll INF = 1e15;

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

int main() {
    ios_base::sync_with_stdio(false); cin.tie(NULL);

    solve();

    return 0;
}