x = int(input()) y = int(input()) moving = int(input()) count = 0 # where quadrant? if y >= 0: count = count + 1 else: count = count + 2 x, y = abs(x), abs(y) while x > 0: count = count + 1 x_move = 1 x = x - moving while y > 0: count = count + 1 y_move = 1 y = y - moving print(count)