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:i64 = read();
    let b:i64 = read();
    let c:i64 = read();
    let x:i64 = read();
    let y:i64 = read();
    let mut ans = a * x + b * y;
    let mut ans2 = 0;
    if(x >= y){
        ans2 = std::cmp::min(ans,std::cmp::min(2 * c * x, 2 * c * y + (x - y)));
    }
    else{
        ans2 = std::cmp::min(ans,std::cmp::min(2 * c * y, 2 * c * d + b * (y - x)))
    }
    println!("{}", ans);
    
}