l = gets.chomp.to_i m = gets.chomp.to_i n = gets.chomp.to_i add25 = n / 25 n %= 25 m += add25 add100 = m / 4 m %= 4 l += add100 l %= 10 p l + m + n