a,b,c,x,y=io.read("*n","*n","*n","*n","*n")
if a+b<=c*2 then
    print(a*x+b*y)
else
    if x>=y then
        print(math.min(c*y*2+a*(x-y), c*x*2))
    else
        print(math.min(c*x*2+b*(y-x), c*y*2))
    end
end