import scala.io.{StdIn => in}
import annotation.tailrec

object Main extends App {

  val Array(a, b, c, x , y) = in.readLine.split(" ").map(_.toInt).toArray
  val ans = Array(
    a * x + b * y,
    math.max(x, y) * c * 2,
    math.min(x, y) * c * 2 + (x - y).abs * (if(x > y) a else b)
  ).min

  println(ans)
}