use std::io::*;
use std::str::FromStr;
fn read<T: FromStr>() -> T {
    let stdin = stdin();
    let stdin = stdin.lock();
    let token: String = stdin
        .bytes()
        .map(|c| c.expect("failed to read char") as char) 
        .skip_while(|c| c.is_whitespace())
        .take_while(|c| !c.is_whitespace())
        .collect();
    token.parse().ok().expect("failed to parse token")
}

fn main(){
    let a:i32 = read();
    let b:i32 = read();
    let c:i32 = read();
    let x:i32 = read();
    let y:i32 = read();
    let mut ans = std::cmp::min(a * x + y * b, c * std::cmp::max(x,y) * 2);
    let mut ans2 = std::cmp::min(2 * c * x + (a - b).abs() * y, 2 * c * y + (a - b).abs() * x);
    println!("{}", std::cmp::min(ans,ans2));
}