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