class Calc0032 def initialize(args) args = args.map { |l| l.chomp.split(/\s+/) } @l = args.shift.first.to_i @m = args.shift.first.to_i @n = args.shift.first.to_i end def run t = @l * 100 + @m * 25 + @n c100 = (t % 1000) / 100 c25 = (t % 100) / 25 c1 = t % 25 c100 + c25 + c1 end end puts Calc0032.new(STDIN.readlines).run if __FILE__ == $0