n=gets.split;n.map!{|x|x.to_i}
a=n[0];b=n[1];c=n[2];x=n[3];y=n[4]
if a+b<c*2 then
	puts a*x+b*y
elsif a+b>c*2 then
	ooihou_price=0
	if x>y then ooihou_price=a else ooihou_price=b end
	puts [[x,y].min*c*2 + (x-y).abs*ooihou_price,[x,y].max*c*2].min
end
