#include <bits/stdc++.h>

using namespace std;

typedef long long ll ;
typedef vector < int > vi ;
typedef pair < int , int > pi ;

// #define int long long
#define pb push_back
#define F first
#define S second
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()
#define Bwka_GOVNO ios_base::sync_with_stdio(false); cin.tie(0);

const ll INF = 1e18;
const int N = 3e5 + 7;
const ll MOD = 1e9 + 7;
const int B = 320;
const int R = 1e9 + 7;

int main() {
	Bwka_GOVNO
	
	ll n , m, k;
	cin >> n >> m >> k;
	
	cout << (ll)(ceil(n / (k * 1.0))) * (ll)(ceil(m / (k * 1.0))) << '\n';
}
	