def Compress(lst): decomp=sorted(list(set(lst))) comp={x:i for i,x in enumerate(decomp)} return comp,decomp N=int(input()) L,R=[],[] for i in range(N): x,r=map(int,input().split()) L.append(x-r) R.append(x+r) comp,decomp=Compress(L+R) le=len(comp) imos=[0]*le for l,r in zip(L,R): l,r=comp[l],comp[r] imos[l]+=1 imos[r]-=1 for i in range(1,le): imos[i]+=imos[i-1] ans=max(imos) print(ans)