# No.48 ロボットの操縦 X, Y, L = [int(input()) for i in range(3)] if X == 0 and Y > 0: result = 0 elif Y > 0: result = 1 elif X == 0 and Y < 0: result = 2 else: result = 3 X = abs(X) Y = abs(Y) while X > 0: result += 1 X -= L while Y > 0: result += 1 Y -= L print(result)