function main()
  
  (A,B,C,X,Y) = map(x -> parse(Int,x), split(readline()))
  
  if 2C*max(X,Y) <= A*X+B*Y
    println(2C*max(X,Y))
  elseif 2C*Y+A*(X-Y) <= A*X+B*Y
    println(2C*Y+A*(X-Y))
  elseif 2C*X+B*(Y-X) <= A*X+B*Y
    println(2C*X+B*(Y-X))
  else
    println(A*X+B*Y)
  end
  
end

main()