#include <bits/stdc++.h>
#define ll long long
#define ff irst
#define ss second
#define pb push_back
#define mp make_pair

using namespace std;

signed main() {
    ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
    ll n, m, k;
    cin >> n >> m >> k;
    cout << ((n + k - 1) / k) * ((m + k - 1) / k);
    return 0;
}
