a, b , c ,x, y = gets.chomp.split(" ").map(&:to_i)
tanpin = a * x + b *y
if x > y
    mix_tanpin = 2 * c * y + a * (x - y)
    mix = c * x * 2
    min_price = [mix_tanpin,mix].min
elsif x < y
    mix_tanpin =2 * c * x + a * (y - x)
    mix = c * y * 2
    min_price = [mix_tanpin,mix].min
else
    min_price = c * y * 2
end
puts [tanpin,min_price].min
