#include <bits/stdc++.h>

#define mp make_pair
#define ull unsigned long long
#define ll long long
#define forn(i, n) for(int i = 0; i < n; i++)
using namespace std;

void start() {
    ll n, m, k;
    cin >> n >> m >> k;
    ll nk = n % k == 0 ? n / k : n / k + 1;
    ll mk = m % k == 0 ? m / k : m / k + 1;
    cout << nk * mk << "\n";
}

int main() {
    int t = 1;
    //cin >> t;
    while(t--)
        start();
}