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

readInt = fst . fromJust . BS.readInt
readIntList = map readInt . BS.words
getInt = readInt <$> BS.getLine
getIntList = readIntList <$> BS.getLine

main = do
    n <- getInt
    as <- sort <$> getIntList
    let m = (last as) `div` 2
    print $ solve 0 m as

solve k _ [] = k
solve k m (a:as) | m < a = k + length (a:as)
solve k m (a:as) = solve k' m (filter ((/= 0) . (`mod` a)) as)
    where k' | null as || head as /= a = k+1
             | otherwise = k