main = do n <- readLn :: IO Int cs <- (map read . words) <$> getLine :: IO [Int] putStr . show . (*) 30 . length $ filter (<= ((sum cs) `div` 10)) cs