#include using namespace std; using ll = long long; using Graph = vector>; const ll mod = 1000000007; const int INF = 1001001001; int main(){ int n; cin >> n; vector ans(500000,0); for(int i = 0; i < n; i++){ int x, r; cin >> x >> r; x += 200000; ans[x-r]++; ans[x+r]--; } for(int i = 0; i < 450000; i++){ ans[i+1] += ans[i]; } int res = *max_element(ans.begin(), ans.end()); cout << res << endl; }