use std::cmp::{max, min};
use std::io::prelude::*;
use std::io::stdin;
use std::str::FromStr;

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

    println!(
        "{}",
        [
            min(x, y)
                * c
                * 2
                * if x > y {
                    cand += (x - y) * a;
                } else {
                    cand += (y - x) * b;
                },
            a * x + b * y,
            max(x, y) * 2 * c
        ]
        .iter()
        .min()
    );
}

#[allow(dead_code)]
fn read<T: FromStr>() -> T {
    let stdin = stdin();
    let token: String = stdin
        .lock()
        .bytes()
        .map(|b| b.unwrap() as char)
        .skip_while(|c| c.is_whitespace())
        .take_while(|c| !c.is_whitespace())
        .collect();
    token.parse().ok().unwrap()
}
