#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define pf push_front
#define ppf pop_front
#define ppb pop_back
#define mp make_pair
#define ff first
#define ss second
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define ll long long
#define ld long double
const ll N = 2e5 + 7;
const ll mod = 1e9 + 7;
const ll inf = 1e18;
const ld pi = 3.141592653589793;
const ld eps = 1e-12;
const ll zero = 0;
const int MAX = 1e6+5;
const int A = 1e9 + 5;
/*if you cant solve the problem:
try optimized(clever) brute-force;
try prefix sums with/or binary search
try dp
try dfs
try to sort(sort(a+1,a+1+n)
int overflow, array bounds
think about special cases( n=1?)
*/


int main(){
	ios::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
 	ld n,m,a;
  	cin>>n>>m>>a;
  	ll b=ceil(n/a)*ceil(m/a);
  	cout<<b;
}

























