X, Y, L = [int(input()) for _ in range(3)] cnt = 0 if X != 0: cnt += (abs(X)+L-1) // L + 1 if Y >= 0: cnt += (Y+L-1) // L else: cnt += (-Y+L-1) // L + 1 print(cnt)