object Main extends App {
  val sc = new java.util.Scanner(System.in)
  val a, b, c, x, y = sc.nextInt()
  if (a + b <= 2 * c) {
    println(a * x + b * y)
  } else {
    var ans = 0
    if (x <= y) {
      ans += 2 * c * x
      ans += (y - x) * b.min(2 * c)
    } else {
      ans += 2 * c * y
      ans += (x - y) * a.min(2 * c)
    }
    println(ans)
  }
}
