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 = 0 else: comm += 2 else: if Y == 0: comm += 1 else: comm += 2 x,mx = divmod(X,L); x += 1 if mx > 0 else x y,my = divmod(Y,L); y += 1 if yx > 0 else y comm = comm + x + y print(comm)