"use strict";
    
const main = arg => {
    arg = arg.trim().split("\n");
    const A = parseInt(arg[0].split(" ")[0]);
    const B = parseInt(arg[0].split(" ")[1]);
    const C = parseInt(arg[0].split(" ")[2]);
    let X = parseInt(arg[0].split(" ")[3]);
    let Y = parseInt(arg[0].split(" ")[4]);
    
    let answer = 0;
    
    while(X > 0 || Y > 0) {
        if(X !== 0 && Y !== 0) {
            // ABピザを使うべきか
            if(A + B > C * 2) {
                answer += C * 2;
                X--;
                Y--;
            } else {
                if(X > 0) {
                    answer += A;
                    X--;
                } else {
                    answer += B;
                    Y--;
                }
            }
        } else {
            if(X > 0) {
                answer += Math.min(A, C * 2);
                X--;
            } else {
                answer += Math.min(B, C * 2);
                Y--;
            }
        }
        
        // console.log("X:" + X);
        // console.log("Y:" + Y);
    }
    
    console.log(answer);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));