#include <bits/stdc++.h>

#define sz(x) (int)(x).size()
#define all(x) (x).begin(), (x).end()

#define fi first
#define se second
#define pb push_back
#define fr(i, l, r) for (int i = (l); i <= (r); i++)

using namespace std;
typedef long long ll;

void solve() {
    ll n,m,k;
    cin>>n>>m>>k;
   cout<<(n/k+(n%k!=0))*(m/k+(m%k!=0));
}

int main() {
//    freopen("input.txt", "r", stdin);
//    freopen("output.txt", "w", stdout);

    ios_base::sync_with_stdio(0);
    cin.tie(0);

    solve();

    return 0;
}
