"use strict";
function Main(input) {
    let cin = new Inputer(input);
    let A = cin.getInt(), B = cin.getInt(), C = cin.getInt(), X = cin.getInt(), Y = cin.getInt();
    let p1 = A * X + B * Y, p2, p3, p4;
    p2 = p3 = p4 = Number.MAX_SAFE_INTEGER
    if (X > Y) {
        p2 = Y * 2 * C + (X - Y) * A;
    } else if (X < Y) {
        p3 = X * 2 * C + (Y - X) * B;
    } else {
        p4 = (X + Y) * C;
    }
    let p5 = Math.max(X, Y) * 2 * C;
    console.log(Math.min(...[p1, p2, p3, p4, p5]));
}
class Inputer{constructor(t){if(typeof t=='undefined')throw new Error('引数（stdin）を省略できません！');this.cnt=0,this.items=t.split(/\n|\s/)}getInt(){return this.items[this.cnt++]-0}getIntArray(t){if(typeof t=='undefined')throw new Error('引数（1以上）を省略できません！');let r=new Array(t);for(let e=0;e<t;e++)r[e]=this.getInt();return r}getStr(){return this.items[this.cnt++]}getStrArray(t){if(typeof t=='undefined')throw new Error('引数（1以上）を省略できません！');let r=new Array(t);for(let e=0;e<t;e++)r[e]=this.getStr();return r}}
if (typeof window == "undefined") Main(require("fs").readFileSync("/dev/stdin", "utf8"));