# 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) if X % L == 0: result += X // L else: result += X // L + 1 if Y % L == 0: result += Y // L else: result += Y // L + 1 print(result)