#include <bits/stdc++.h>
 #pragma GCC optimize("Ofast")
#pragma GCC optimize ("unroll-loops")
#pragma GCC optimize("inline")
#pragma GCC optimize("-fgcse,-fgcse-lm")
#pragma GCC optimize("-ftree-pre,-ftree-vrp")
#pragma GCC optimize("-ffast-math")
#pragma GCC optimize("-fipa-sra")
#pragma GCC optimize("-fpeephole2")
#pragma GCC optimize("-fsched-spec")
#pragma GCC optimize("Ofast,no-stack-protector")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,tune=native")
#pragma GCC optimize("unroll-loops")
using namespace std;
//abeke08

typedef long long ll;
typedef unsigned long long ull;
 
#define all(x) x.begin(), x.end()
#define sz(x) (int)x.size()
#define pb push_back
#define speed ios::sync_with_stdio( false); cin.tie(nullptr); cout.tie(0);
#define forn(i, n) for(int i = 0; i < int(n); i++)
#define eb emplace_back
#define nl '\n'
#define ff first
#define ss second
#define __gcd gcd
#define ins insert
const int inf = INT_MAX;
const int mod = 1e9+7;
void solve() {
    int n, m, k;
    cin >> n >> m >> k;
    cout << (n/k+bool(n%k != 0))*(m/k+bool(m%k != 0));
    
}

int main()
{
    ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
    /*int t;
    cin >> t;
    while (t --> 0) */
        solve();
    return 0;
}