function Main(input) {
    let input = input.split(" ");
    let a = Number.parseInt(input[0], 10), b = Number.parseInt(input[1], 10),
        c = Number.parseInt(input[2], 10), x = Number.parseInt(input[3], 10),
        y = Number.parseInt(input[4], 10);
    let min = Math.min(x, y), max = Math.max(x, y);
    let singlePrice = min * a + min * b, setPrice1 = min * c * 2, setPrice2 = max * c * 2;
    if (setPrice2 < singlePrice) {
        console.log(setPrice2);
    }
    else if (setPrice1 < singlePrice) {
        console.log(setPrice1 + (x - min) * a + (y - min) * b);
    }
    else {
        console.log(a * x + b * y);
    }
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));