A,B,C,X,Y = gets.split(" ").map { |e| e.to_i }

count = 0

if (B+A)/2 <= C
  count = A*X + B*Y
elsif C*2 < A and C*2 < B
  count = C*[X,Y].max*2
elsif X<Y and B>2*C
  count = 2*C*Y
elsif Y<X and A>2*C
  count = 2*C*X
else
  if X<Y
    count = C*X*2 + B*(Y-X)
  else
    count = C*2*Y + A*(X-Y)
  end
end

puts count
