import java.util.*; public class Main { static final int BASE = 100000; public static void main (String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int[] imos = new int[BASE * 4 + 1]; for (int i = 0; i < n; i++) { int x = sc.nextInt(); int r = sc.nextInt(); imos[x + BASE * 2 - r]++; imos[x + BASE * 2 + r]--; } int max = imos[0]; for (int i = 1; i < imos.length; i++) { imos[i] += imos[i - 1]; max = Math.max(max, imos[i]); } System.out.println(max); } }