# 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 else: result = 2 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)