import Data.List

main = interact $ show . sol . map read . tail . words

sol as = length $ f mx as'
  where
  as' = sort as
  mx = last as'

f _ [] = []
f mx (a:as) = if a `elem` as 
    then f mx' as'
    else if a*2>mx 
      then a:as
      else a:f mx' as'
  where
  as' = filter ((>0) . (`rem` a)) as
  mx' = last as'