#include <bits/stdc++.h>
#define ll long long
#define pb push_back
using namespace std;
const ll N = 2e5 + 5;
const ll mod = 1e9 + 7;
const ll inf = 1e18;
ll n,m,k;
int main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cin>>n>>m>>k;
    ll r = (n + k - 1) / k;
    ll c = (m + k - 1) / k;
    ll ans = r * c;
    cout<<ans;
    return 0;
}
