import qualified Data.ByteString.Char8 as BS
import Data.Maybe
import Data.Ord
import Data.List
import qualified Data.Set as Set

readInt = fst . fromJust . BS.readInt
readIntList = map readInt . BS.words

getInt = readInt <$> BS.getLine
getIntList = readIntList <$> BS.getLine


ordNub :: (Ord a) => [a] -> [a]
ordNub l = go Set.empty l
  where
    go _ []     = []
    go s (x:xs) = if x `Set.member` s then go s xs
                                      else x : go (Set.insert x s) xs

--fac :: Int -> [Int] -> Int -> [(Int, Int)]
--fac 1 _ _ = []
--fac x (p : ps) n
--  | p > n = [(x, 1)]
--  | otherwise = tup ++ fac x' ps n
--  where
--    count = divn x p
--    (tup, x') =
--      if count == 0
--        then ([], x)
--        else ([(p, count)], x `div` p ^ count)

cc :: Int -> [Int] -> Int
cc x [] = 1
cc x (y:ys) | x == y = cc x ys
            | x < y = 1
            | x `mod` y /= 0 = cc x ys
            | otherwise = 0

calc :: [Int] -> [Int] -> [Int]
calc [] xs' = []
calc (x:xs) xs' | cc x xs' == 1 = x : calc xs xs'
                | otherwise = calc xs xs'

--cc' :: Int -> [Int] -> Int
--cc' t [] = 1
--cc' t (s:ss) |
--
--calc' :: [(Int Int)] -> [(Int->Int)] -> [(Int->Int)]
--calc' [] ts' = []
--calc' (t:ts) ts' | cc' t ts' == 1 = t : calc ts ts'
--                 | otherwise = calc ts ts'

main = do
  n <- getInt
  as <- getIntList
  let as' = ordNub as
  let ds = as \\ as'
  if length as' == 0
    then print 0
    else do
--      let facs = map fac as'
      let rs = calc as' as'
      print $ length(filter (\x -> x `notElem` ds) rs)
