fun main() { var l = readLine()!!.toInt() var m = readLine()!!.toInt() var n = readLine()!!.toInt() var count = 0 count += n % 25 m += n / 25 count += m % 4 l += m / 4 count += l % 10 println(count) }