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, x + l - 1)

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 snd xl.(i) < e

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