n, m, k = map(int, input().split())

lights_per_square = 1

squares_in_length = (n + k - 1) // k
squares_in_width = (m + k - 1) // k

total_lights = lights_per_square * squares_in_length * squares_in_width

print(total_lights)