from collections import defaultdict def main(): N = int(input()) grid = defaultdict(int) for _ in range(N): center, radius = map(int, input().split()) for x in range(center-radius, center+radius): grid[x] += 1 print(max(grid.values())) if __name__ == "__main__": main()