import Control.Applicative
import Control.Monad
import Data.List

main :: IO ()
main = do
  n <- readLn
  solve <$> replicateM n f >>= print
  where
    f = (\[x, l] -> (x+l, x-l)) <$> map read <$> words <$> getLine

solve :: [(Int, Int)] -> Int
solve = fst . foldl' f (0, -1000000000) . sort
  where
    f (ct, p) (r, l)
      | p <= l = (ct+1, r)
      | otherwise = (ct, p)
