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