y = int(input()) x = int(input()) l = int(input()) res = 0 if x >= 0 and y == 0: res += 0 elif x >= 0: res += 1 else: res += 2 res += (abs(x) + l - 1) // l res += (abs(y) + l - 1) // l print(res)