X, Y, L = [int(input()) for _ in range(3)] y1 = (Y+L-1) // L y2 = (-Y+L-1) // L x = (abs(X)+L-1) // L cnt = 0 if Y >= 0 and X != 0: cnt += y1 cnt += x + 1 elif Y >=0 and X == 0: cnt += y1 elif Y < 0 and X != 0: cnt += y2 + 1 cnt += x + 1 elif Y < 0 and X == 0: cnt += y2 + 2 print(cnt)