senkyo :: [Int] -> Int senkyo cs = 30 * (length (filter (<= threshold) cs)) where threshold = flip div 10 $ sum cs main = do getLine cs <- map read . words <$> getLine print $ senkyo cs