#include <bits/stdc++.h>

using namespace std;
using ull = unsigned long long;
using ld = long double;
using ll = long long;
using PII = pair<int, int>;
using PLL = pair<long long, long long>;
using PSS = pair<string, string>;
using ui = unsigned int;

#define fast_io ios::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr);
#define mp make_pair
#define pb push_back
#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()
#define lb(set, x) set.lower_bound(x)
#define ub(set, x) set.upper_bound(x)

const ll INF = 1e18;
const ll MOD = 1e9 - 7;

void solve() {
    ll n, m, k;
    cin >> n >> m >> k;

    cout << (m / k + (m % k ? 1 : 0)) * (n / k + (n % k ? 1 : 0)) << '\n';
}

signed main() {
    fast_io;
    solve();
    return 0;
}