
fn main() {
    let a:usize = read();
    let b:usize = read();
    let c:usize = read();
    let x:usize = read();
    let y:usize = read();
    let mut ans = 0;
    ans += min(a+b, c*2) * min(x, y);
    if x > y {
        ans += min(a, c*2) * (x-y);
    } else {
        ans += min(b, c*2) * (y-x);
    }
    println!("{}", ans);
}