import Data.List

main = do
  n <- readLn :: IO Int
  xls <- map (map read . words) <$> lines <$> getContents :: IO [[Int]]
  putStrLn $ show $ count $ sortOn snd $ map (\(x: l: _) -> (let b = x - l in if b < 0 then 0 else b, x + l)) xls

foldlState :: (a -> c -> b -> (a, c)) -> a -> c -> [b] -> a
foldlState f a s l = fst $ foldl (\(a, s) -> f a s) (a, s) l

count ys = foldlState step 0 0 ys
    where step a k (b, e)
              | b < k     = (a, k)
              | otherwise = (a + 1, e)
