main = do getLine c <- map read . words <$> getLine let border = sum c `div` 10 print . (* 30) . length $ filter (<= border) c