import scala.io.StdIn
import scala.math.ceil
object Main extends App {
  val List(a,b,c,x,y) = StdIn.readLine().split(" ").map(_.toInt).toList
  val answer =
    List(
      c * x.max(y) * 2,
      c * x.min(y) * 2 + (if (x > y) a * (x - y) else b * (y -x)),
      a * x + b * y
    ).min
  println(answer)
}
