from itertools import accumulate n=int(input()) p=[0]*(5*(10**5)+100) for _ in range(n): x,r=map(int,input().split()) x+=(10**5)*2+100 p[x-r]+=1 p[x+r+1]-=1 q=list(accumulate(p)) print(max(q))