import kotlin.math.max
import kotlin.math.min

fun main() {
    var (a,b,c,x,y)= readLine()!!.split(" ").map { it.toInt() }
    if (2*c<a+b){
        var tmp= min(x,y)
        if (((x-tmp)!=0 && 2*c<a)||(y-tmp)!=0 && 2*c<b){
            println(2* max(x,y)*c)
        }else{
            println((x-tmp)*a+(y-tmp)*b+2*tmp*c)
        }
    }else{
        println(a*x+b*y)
    }
}