#include<iostream>
using namespace std;
int main(){
	long long n, m, k, a=0, b=0;
	cin >> n >> m >> k;
    if(n % k != 0){
    	a = n / k + 1;
	}
	else if(n % k == 0){
		a = n / k;
	}
	if(m % k != 0){
    	b = m / k + 1;
	}
	else if(m % k == 0){
		b = m / k;
	}
	cout << a*b;
}
