function main(input) {
    var a = input[0].split(" ")[0]-0;
    var b = input[0].split(" ")[1]-0;
    var c = input[0].split(" ")[2]-0;
    var x = input[0].split(" ")[3]-0;
    var y = input[0].split(" ")[4]-0;
    var ans = a*x+b*y;
    ans = Math.min(ans, Math.min(x,y)*c*2 + (x>y?((x-y)*a):((y-x)*b)));
    ans = Math.min(ans, Math.max(x,y)*c*2);
    console.log(ans);
}

main(require('fs').readFileSync('/dev/stdin', 'utf8').trim().split("\n"));


//1 2 3 4 5 6
