#[allow(dead_code)]
fn read<T: std::str::FromStr>() -> T
{
    std::io::Read::bytes(std::io::stdin())
                    .map(|c| c.unwrap() as char)
                    .skip_while(|c| c.is_whitespace())
                    .take_while(|c| !c.is_whitespace())
                    .collect::<String>()
                    .parse().ok().unwrap()
}

fn main() {
    let a: i32 = read();
    let b: i32 = read();
    let c: i32 = read();
    let x: i32 = read();
    let y: i32 = read();

    let price;

    if a + b < c * 2 {
        price = a * x + b * y;
    } else {
        if x > y {
            if a > c * 2 {
                price = c * 2 * x;
            } else {
                price = c * 2 * y + a * (x - y);
            }
        } else {
            if b > c * 2 {
                price = c * 2 * y;
            } else {
                price = c * 2 * x + a * (y - x);
            }
        }
    }

    println!("{}", price);
}
