#include <bits/stdc++.h>

#define ll long long
#define ld long double

using namespace std;

void MAIN() {
    ll m,n,k;
    cin>>n>>m>>k;
    ll a = n/k, b = m/k;
    if(m%k) b++;
    if(n%k) a++;
    cout<<a*b;
}

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr); cout.tie(nullptr);
    ll T = 1; //cin >> T;
    while (T--) MAIN();
    return 0;
}
