#include <bits/stdc++.h>
#define int long long
#define ll long long
#define str string
#define ld long double
#define run_vasya_run ios_base::sync_with_stdio(0) , cin.tie(0) ,cout.tie(0)
#define uint unsigned long long
#define fi first
#define se second
#define pb push_back
#define open freopen ("log.in", "r", stdin);
#define close freopen("log.out", "w", stdout);
using namespace std;
const int MOD = 10000000007;
ll _ , n , m , k;
main()
{
    //run_vasya_run;
    _ = 1;
    //open;
    //close;
    //cin >> _;
    while(_ --)
    {
        cin >> n >> m >> k;
        cout << ((n + k - 1) / k) * ((m + k - 1) / k);
    }
}
