import scala.io.StdIn

object Main extends App {
  val Array(a, b, c, x, y) = StdIn.readLine().split(' ').map(_.toInt)

  //println((a + b) / (c * 2))
  if ((a + b) / (c * 2) >= 1) {
    // cで買った方が安い
    val r1 = if (x > y) x * c * 2 else y * c * 2
    val r2 = if (x > y) (x - y) * a + y * c * 2 else (y - x) * b + x * c * 2
    println(if (r1 > r2) r2 else r1)

  } else {
    println(a * x + b * y)
  }
}