#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#include <random>
#include <numeric>
#include <map>
#include <set>
#include <string>

using namespace std;
using ll = long long;
using ld = long double;

#define deb(x) cerr << #x << ":\t" << x << '\n';
#define len(x) (ll) x.size()

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

ll gcd(ll a, ll b) {
    while (a && b) {
        if (a > b) a %= b;
        else b %= a;
    }
    return a + b;
}

ll binPow(ll a, ll n) {
    if (n == 0) return 1;
    if (n % 2 == 1) return a * binPow(a, n - 1);
    else {
        ll b = binPow(a, n / 2);
        return b * b;
    }
}

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

int main() {
    int T = 1;
    //    cin >> T;
    while (T--) {
        solve();
    }
    return 0;
}
