import java.util.*

fun main(args: Array<String>) {
    val sc = Scanner(System.`in`)
    val a = sc.nextInt()
    val b = sc.nextInt()
    val c = sc.nextInt()
    val x = sc.nextInt()
    val y = sc.nextInt()

    val ansList = mutableListOf<Int>()
    
    val case1 = a * x + b * y
    ansList.add(case1)

    val case2 = c * Math.max(x, y) * 2
    ansList.add(case2)

    var case3: Int
    if (x > y) {
        case3 = (x - y) * a + 2 * y * c
    } else {
        case3 = (y - x) * b + 2 * x * c
    }
    ansList.add(case3)

    println(ansList.min())
}