def steps(distance, stride): distance = abs(distance) return distance // stride if distance % stride == 0 else distance // stride + 1 X = int(input()) Y = int(input()) L = int(input()) if X != 0 and Y >= 0: print(steps(Y, L) + 1 + steps(X, L)) elif X == 0 and Y >= 0: print(steps(Y, L)) elif X != 0 and Y < 0: print(1 + steps(X, L) + steps(Y, L)) elif X == 0 and Y < 0: print(1 + 1 + steps(Y, L))