local t = {} local offset = 200001 for i = 1, 800004 do t[i] = 0 end local n = io.read("*n") for i = 1, n do local x, r = io.read("*n", "*n") x = x + offset t[(x - r) * 2 + 1] = t[(x - r) * 2 + 1] + 1 t[(x + r) * 2] = t[(x + r) * 2] - 1 end local ret = 0 for i = 2, 800004 do t[i] = t[i] + t[i - 1] if ret < t[i] then ret = t[i] end end print(ret)