import math


n, m, k = input().split(' ')
n = int(n)
m = int(m)
k = int(k)
horizontal = math.ceil(float(n) / float(k))
vertical = math.ceil(float(m) / float(k))
amount_of_lights = horizontal * vertical

print(amount_of_lights)
