
a, b, c = map(int, input().split())
if a <= c and b <= c:
	print(1)
else:
	x = a // c
	y = b // c
	res = x * y
	b1 = True
	b2 = True
	if a % c != 0:
		res += 1
		b1 = False
	if b % c!= 0:
		res += 1
		b2 = False
	if not b1 and not b2:
		print("ha")
		res += 1
	print(res)