import sys for n in "XYL": exec(f"{n} = int(input())") turn = 0 if X == 0: if Y == 0: print(0) sys.exit() elif Y < 0: turn = 2 else: turn = 1 X = abs(X) Y = abs(Y) x,mx = divmod(X,L); x = x + 1 if mx > 0 else x y,my = divmod(Y,L); y = y + 1 if my > 0 else y comm = turn + x + y print(comm)