#include <iostream>
#include <cmath>
#include <algorithm>
using namespace std;

int main() {
	int m,n;
	cin>>m>>n;
	int a;
	cin>>a;
	int ans1,ans2;
	ans1=m/a;
	ans2=n/a;
	if(m%a!=0)
	{
		ans1+=1;
	}
	if(n%a!=0)
	{
		ans2+=1;
	}
	cout<<ans1*ans2;
}