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