#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;
    ll a = ceil(static_cast<double>(n) / k);
    ll b = ceil(static_cast<double>(m) / k);
    cout << a * b;

    return 0;
}
