fun main(args: Array) { val n = readLine()!!.toInt() val c = readLine()!!.split(" ").map { it.toInt() } val total = c.sum() val ans = c.count { it <= total / 10 }*30 println(ans) }