#include using namespace std; int main() { int N; cin >> N; vector x( N ); vector r( N ); for( int i = 0; i < N; i++ ) { cin >> x[i] >> r[i]; } const int n = 100000; vector a( 4 * n + 1 ); for( int i = 0; i < N; i++ ) { int l = x[i] - r[i] + 2 * n; int rr = x[i] + r[i] + 2 * n; a[l]++; a[rr]--; } for( int i = 0; i < 4 * n + 1 - 1; i++ ) { a[i + 1] += a[i]; } int ans = 0; for( int i = 0; i < 4 * n + 1; i++ ) { ans = max( ans, a[i] ); } cout << ans << endl; }