import scala.math.min

object Main {
  def main(args: Array[String]): Unit = {
    solve
  }

  def solve(): Unit = {
    val sc = new java.util.Scanner(System.in)
    val a, b, c, x, y = sc.nextInt

    val aPrice = min(a, c * 2)
    val bPrice = min(b, c * 2)
    val abPrice = min(a + b, c * 2)
    val abFlg = a != aPrice || b != bPrice || (a + b) != abPrice

    val payment =
      if (abFlg) {
        val abPayment = abPrice * min(x, y)
        val notAbPayment =
          if (x == y) 0
          else if (x < y) (y - x) * bPrice
          else (x - y) * aPrice
        abPayment + notAbPayment
      } else {
        x * aPrice + y * bPrice
      }

    println(payment)

  }
}
