
object Main {
  def main(args: Array[String]) {
    def compare(a: => Long, b: => Long): Boolean = a <= b
    val sc = new java.util.Scanner(System.in)
    val A = sc.nextInt
    val B = sc.nextInt
    val C = sc.nextInt
    val X = sc.nextInt
    val Y = sc.nextInt
    val result = if (2 * C > A + B) {
      A * X + B * Y
    } else if (X < Y) {
      if (2 * C < B) {
        2 * C * Y
      } else {
        2 * C * X + B * (Y - X)
      }
    } else {
      if (2 * C < A) {
        2 * C * X
      } else {
        2 * C * Y + A * (X - Y)
      }
    }
    println(result)
  }
}