use std::*;

#[allow(dead_code)]
fn read<T: str::FromStr>() -> T {
    let mut buf = String::new();
    io::stdin().read_line(&mut buf).ok();
    buf.trim().parse().ok().unwrap()
}

#[allow(dead_code)]
fn read_vec<T: str::FromStr>() -> Vec<T> {
    read::<String>()
        .split_whitespace()
        .map(|a| a.parse().ok().unwrap())
        .collect()
}

#[allow(dead_code)]
fn read_vec2d<T: str::FromStr>(n: u32) -> Vec<Vec<T>> {
    (0..n).map(|_| read_vec()).collect()
}

fn main() {
    let v = read_vec::<u32>();
    let (a, b, c, mut x, mut y) = (v[0], v[1], v[2], v[3], v[4]);
    let mut sum = 0;

    if (a + b) >= 2 * c {
        let min = cmp::min(x, y);
        sum += c * 2 * min;
        if x < y {
            x = 0;
            y = y - x;
        } else {
            x = x - y;
            y = 0;
        }
    }
    sum += x * a + y * b;
    println!("{}", sum);
}
