import Data.Bool
import Data.List

main = do
  getLine
  ns <- sort . map read . words <$> getLine :: IO [Int]
  print $ solve ns

solve ns = step [] ns
  where
    step ps [] = length ps
    step [] (q:qs) = step [q] qs
    step (p:ps) (q:qs) =
      let (ps', qs') = span (<p*2) (q:qs)
      in (bool 1 0 (p == q)) + (step (ps ++ (dropWhile (==p) ps')) $ filter ((/=0) . (`mod` p)) qs')