import Control.Monad

main :: IO ()
main = do
  n <- readLn
  as <- join <$> (replicateM n $ map read . words <$> getLine) :: IO [Int]
  print . length . join . map
    (\n -> [ 1 | i <- [2..(max 2 (n - 1))], n `mod` i == 0]) $ as

