import java.math.*

fun main(args: Array<String>) {
    val (A, B, C, X, Y) = readInputLine().split(" ").map{it.toLong()}
    
    if (A + B <= C * 2L) {
        println(A * X + B * Y)
        return
    }
    
    val more = if (X > Y) Pair(A, X) else Pair(B, Y)
    val less = if (X > Y) Pair(B, Y) else Pair(A, X)
    
    println(less.second * 2L * C + (more.second - less.second) * Math.min(2L * C, more.first))
}

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