#include <bits/stdc++.h>
#define ll long long
using namespace std;
int main() {
    ll n, m, a, s = 1;
    cin >> n >> m >> a;
    if(n > a)
        s *= (n + a - 1) / a;
    if(m > a)
        s *= (m + a - 1) / a;
    cout << s;
    return 0;
}
