a,b,c,x,y=gets.split.map(&:to_i)
answer=0
min=[x,y].min
max=[x,y].max

if a+b>2*c
   answer+=c*min*2 
else
   answer+=(a+b)*min
end

if x>y
    
    if a<2*c
        answer+=(x-y)*a
    else
        answer+=(x-y)*c*2
    end
else
    if b<2*c
        answer+=(y-x)*a
    else
        answer+=(y-x)*c*2
    end
    
end

puts answer