pasta = Array.new(3)
pasta[0] = gets.to_i
pasta[1] = gets.to_i
pasta[2] = gets.to_i
juice = Array.new(2)
juice[0] = gets.to_i
juice[1] = gets.to_i
a = 0
b = 0
while a<=2 do
       if x>pasta[a]
              x = pasta[a]
       else
             x = x
       end
a = a+1
end
while b<=1 do
       if y>drink[b]
              y = drink[b]
        else
              y = y
       end
b = b+1
end
puts #{x}+#{y}-50