'use strict'

const main = (input) => {
    input = input.split(' ').map(v => parseInt(v))
    const A = input[0]
    const B = input[1]
    const C = input[2]
    const X = input[3]
    const Y = input[4]
    let restX = X
    let restY = Y

    let pay = 0
    if(A + B >= C * 2){
        if(X <= Y){
            pay = C * X * 2
            restX = 0
            restY = Y - X
        }else{
            pay = C * Y * 2
            restY = 0
            restX = X - Y
        }
    }
    if(A > C * 2 && restX > 0){
        pay = C * restX * 2
        restX = 0
        restY = Math.max(0, restY - X)
    }
    if(B > C * 2 && restY > 0){
        pay = C * restY * 2
        restY = 0
        restX = Math.max(0, restX - Y)
    }
    console.log(pay + restX * A + restY * B)
}

main(require('fs').readFileSync('/dev/stdin', 'utf-8'))