import strutils, math let X, Y, L = stdin.readLine.parseInt proc move(t: int): auto = (t.abs / L).ceil.int var cnt = 0 if Y < 0: cnt += 2 elif X != 0: cnt += 1 cnt += Y.move cnt += X.move echo cnt