import java.util.*

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

fun problem095c(a: Long, b: Long, c: Long, x: Long, y: Long): Long {
    val min = Math.min(x, y)
    val minPrice = Math.min(a, b)

    fun normal(): Long {
        var price = 0L
        price += c * min * 2
        return price + ((x - min) + (y - min)) * minPrice
    }

    fun noSeparate(): Long {
        return a * x + b * y
    }

    fun allSeparate(): Long {
        return c * Math.max(x, y) * 2
    }

    return listOf(normal(), noSeparate(), allSeparate()).min()!!
}