def f(X): Y = (abs(X)+L-1) // L return Y X, Y, L = [int(input()) for _ in range(3)] cnt = f(X) + f(Y) + 1 if Y >= 0 and X == 0: cnt -= 1 elif Y < 0: cnt += 1 print(cnt)