import scala.io.Source

object Main extends App {
  val lines: Iterator[String] = Source.stdin.getLines()
  val arr = lines.next.split(" ").map(_.toInt)
  val (a, b, c, x, y) = arr.toList match {
    case a1 :: b1 :: c1 :: x1 :: y1 :: Nil => (a1, b1, c1, x1, y1)
    case _ => throw new IllegalArgumentException("")
  }

  val result =
    List(
      c * x.max(y) * 2,
      c * x.min(y) * 2 + (if (x > y) (x - y) * a else (y - x) * b),
      a * x + b * y
    ).min

  println(result)
}
