n = int(input()) cnt = [0 for _ in range(4 * 10 ** 5 + 1)] C = 2 * 10 ** 5 for _ in range(n): x, r = map(int, input().split()) cnt[x - r + C] += 1 cnt[x + r + C] -= 1 ans = 0 total = 0 for num in cnt: total += num ans = max(ans, total) print(ans)