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