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