import kotlin.math.abs
import kotlin.math.min

fun main() {
    val abcxy = nextIntList()
    val ans = solve(abcxy)
    println(ans)
}

fun solve(abcxy: List<Int>): Int {
    val a = abcxy[0]
    val b = abcxy[1]
    val c = abcxy[2]
    val x = abcxy[3]
    val y = abcxy[4]

    val half = min(min(x , y) * c * 2 , a * x + b * y)
    val only = if (x - y > 0) {
        a * (x - y)
    } else {
        b * (y - x)
    }

    return half + only
}


fun nextInt(): Int {
    return readLine()!!.toInt()
}

fun nextIntList(): List<Int> {
    return readLine()!!.split(" ").map { it.toInt() }
}

fun nextIntLineList(n: Int): List<List<Int>> {
    return (1..n).map { readLine()!!.split(" ").map { it.toInt() } }
}

fun nextLong(): Long {
    return readLine()!!.toLong()
}

fun nextLongList(): List<Long> {
    return readLine()!!.split(" ").map { it.toLong() }
}

fun nextString(): String {
    return readLine()!!
}