#include <bits/stdc++.h>
#define file(s) if (fopen(s".in", "r")) freopen(s".in", "r", stdin), freopen(s".out", "w", stdout)
#define Youarestupid ios_base::sync_with_stdio(0);cin.tie(0);
#define all(x) x.begin() , x.end()
#define	pofik continue
#define int long long
#define pb push_back
#define ins insert
#define sz size()
#define F first
#define S second
const int N = 2e5 + 77 , inf = 1e18 + 77 , MOD = 1e9 + 7;
const long double eps = 1e-11;
using namespace std;
int T = 1 , sum;
int binpow(int a , int b){
    if (!b) return 1;
    if (b % 2){
        return (a * binpow(a , b - 1)) % MOD;
    }
    else{
        int val = binpow(a , b / 2);
        return (val * val) % MOD;
    }
}

void solve(){
	int n , m , a;
	cin >> n >> m >> a;
	int x = (n + a - 1) / a;
	int y = (m + a - 1) / a;
	int ans = x * y;
	cout << fixed << setprecision(0) << ans;
}

signed main(){
    Youarestupid
//	cin >> T;
    while(T--){
    	solve();
    }
}
/*
  ___      __                      _
 |   \    | |          _____      | |  _
 | |\ \   | |  __  __ |  __ \     | | (_)
 | | \ \  | | | |  | || |  \_\__ _| |  _
 | |  \ \ | | | |  | || |    / _` | | | |
 | |   \ \| | | |__| || |   / (_| | | | |
 |_|    \___| |______||_|    \_,__|_| |_|

*/







