import kotlin.math.abs
import kotlin.math.max
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 aaaa = min(x, y) * c * 2
    val bbbbb = a * x + b * y
    val ccccc = max(x, y) * c * 2

    val only = if (x - y > 0) {
        a * (x - y)
    } else {
        b * (y - x)
    }

    return min(min(aaaa + only, bbbbb),ccccc)
}


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()!!
}