x = int(input()) y = int(input()) l = int(input()) x = abs(x) ans = 0 if y < 0: ans += 1 x, y = -y, x ans += (y + l - 1) // l + (0 if x == 0 else 1 + (x + l - 1) // l) print(ans)