import qualified Data.Vector as V
import Control.Monad
import Control.Applicative
import Data.List

toTuple :: [Int] -> (Int, Int)
toTuple [x,l] = (x+l, x-l)

solve :: V.Vector (Int,Int) -> Int
solve xs = fst $ foldl' (\(res, curr) (l,s) -> if curr <= s then (res+1, l) else (res, curr)) (0, negate $ 10^10) xs

main = do
  n <- readLn :: IO Int
  arms <- replicateM n (toTuple . map read . words <$> getLine)
  print $ solve (V.fromList $ sort arms)
