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

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

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

unDiv :: [Integer] -> Int
unDiv xs
  | null cnt   = 0
  | otherwise  = length $ xs \\ cnt
  where
    uniq  = foldl' union [] $ map (\x -> [x, x*2..maximum xs]) xs
    cnt   = sort $ nub $ [cnt | el <- uniq, cnt <-[el*2,el*3..maximum uniq]]

main :: IO ()
main = do
  getLine
  as <- getIntList
  print $ unDiv as