import sys for n in "XYL": exec(f"{n} = int(input())") comm = 0 if X == 0: if Y == 0: print(comm) sys.exit() elif Y < 0: comm += 2 else: if Y == 0: comm += 1 else: comm += 2 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 = comm + x + y print(comm)