#include<bits/stdc++.h>

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

using namespace std;

const int MAX = 2e5 + 7;


int main () {
    //freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);
    long long n,m,k;
    cin>>n>>m>>k;
    cout<<((n+k-1)/k)*((m+k-1)/k);
}
