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