#include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define pf push_front
#define ins insert
#define mp make_pair
#define S second
#define F first
#define ull unsigned long long

using namespace std;


int main(){
    ios::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    ll n, m, k;
    cin >> n >> m >> k;
    cout << ceil((n + k - 1ll) / k) * ceil((m + k - 1ll) / k);
    return 0;
}
