#pragma GCC optimize("O3,unroll-loops") 
#pragma GCC target("avx2,bmi,bmi2,popcnt,lzcnt") 
//#pragma GCC optimize("Ofast") 
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4,abm,mmx,avx,tune=native") 
//#include <algorithm> 
#include <bits/stdc++.h> 
//#include <cmath> 
//#include <iostream> 
//#include <vector> 
//#include <map> 
//#include <set> 
//#include <deque> 
//#include<stack> 
//#include<string> 
//#include<string.h> 
//#include<set> 
//#include<map> 
//#include<bitset> 
//#include<stdlib.h> 
//#include<cassert> 
//#include<time.h> 
//#include<bitset> 
 
using namespace std; 
 
#define pb push_back 
#define sz size() 
#define ff first 
#define ss second 
#define ull unsigned long long 
#define all(x) x.begin(), x.end() 
#define Resh cin>>tt;while(tt--)so(); 
#define freopen(x) freopen(x".in","r",stdin);freopen(x".out","w",stdout); 
#define fast ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0); 
#define ll long long 
 
const long long n6 = 1e6+5; 
const long long n5 = 2e5+5; 
const long long inf = 1e9+10; 
const long long mod = 1e9; 
const string alp = "abcdefghijklmnopqrstuvwxyz"; 
//mt19937 rng(chrono::steady_clock::now().time_since_epoch().count()); 
 
//-------------------------------------------------------------------------- 
 
int a[n5], b[n5]; 
 
main() { 
    double n, m, k; 
    cin >> n >> m >> k; 
    cout << ceil(n/k) * (m/k); 
 }