let () =
    let main () =
        let n = int_of_string (read_line ()) in
        let xl = Array.init n (fun _ ->
            Scanf.scanf " %d %d" (fun x l -> x, l))
        in
        let l = Array.fold_left (fun acc (x, l) -> (x - l, x + l) :: acc) [] xl in
        let l = List.sort compare l in
        let k = Array.make (n + 1) 1_000_000_001 in
        let () = k.(0) <- -1_000_000_001 in
        let rec loop m = function
            | [] -> m
            | (left, right) :: tl ->
                let rec loop2 m mj =
                    if mj < 0 then m else
                        let m = if k.(mj) <= left then (
                            let () = k.(mj + 1) <- min right k.(mj + 1) in
                            max m (mj + 1)
                        ) else m
                        in
                        loop2 m (mj - 1)
                in
                let m = loop2 m m in
                loop m tl
        in
        loop 0 l |> Printf.printf "%d\n"
    in
    main ()