X, Y, L = (int(input()) for _ in range(3)) d = -(-abs(X) // L) -(-abs(Y) // L) if Y < 0: print(2 + d) elif X == 0: print(d) else: print(1 + d)