import java.util.Scanner

object Main {
  def main(args: Array[String]) {
    solve(new Scanner(System.in))
  }

  def solve(sc: Scanner): Unit = {
    val A = sc.nextInt
    val B = sc.nextInt
    val C = sc.nextInt
    var X = sc.nextInt
    var Y = sc.nextInt

    var p = if (A + B > C * 2) {
      val m = List(X, Y).min
      X -= m
      Y -= m
      C * 2 * m
    } else 0
    p += List(A, C * 2).min * X
    p += List(B, C * 2).min * Y
    println(p)
  }
}
