object Main
  extends App {
  val (a, b, c, x, y) = readLine.split(" ").map(_.toInt) match {
    case Array(a, b, c, x, y) => (a, b, c, x, y)
  }
  println(if (a + b >= 2 * c) {
    math.min(x, y) * 2 * c + (if (x > y) math.min((x - y) * a, (x - y) * 2 * c) else math.min((y - x) * b, (y - x) * 2 * c))
  } else {
    a * x + b * y
  })
}