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