import Control.Applicative main = do n:c <- map read . words <$> getContents print $ (*30) $ length $ filter (<= sum c) $ map (*10) c