let n = Scanf.sscanf (read_line ()) "%d" @@ fun n -> n
let xl = Array.init n @@ fun _ -> Scanf.sscanf (read_line ()) "%d %d" @@ fun x l -> (x, l)

let ans = Array.make n 0

let rec loop e i =
  if i < 0 then true
  else if ans.(i) = 0 then loop e (i - 1)
  else fst xl.(i) < e

let () =
  Array.sort (fun (a, _) (b, _) -> a - b) xl;
  Array.iteri (fun i (x, l) -> ans.(i) <- if loop (x - l) i then 1 else 0) xl;
  Printf.printf "%d\n" @@ Array.fold_left (+) 0 ans