a,b,c,x,y = gets.split.map &:to_i
 
max = 500000000
(0..(2*[x,y].max + 1)).each do |i|
    pay = i * c + [(x - (i / 2)), 0].max * a + [(y - (i / 2)), 0].max * b
    max = pay if pay < max
end
puts max