import std;

alias sread = () => readln.chomp();
alias lread = () => readln.chomp.to!long();
alias aryread(T = long) = () => readln.split.to!(T[]);

void main()
{
    long a, b, ab, x, y;
    scan(a, b, ab, x, y);
    long cost1, cost2, cost3, cost4;
    cost1 = a * x + b * y;
    cost2 = ab * 2 * max(x, y);

    long tmp;
    tmp = ab * min(x, y) * 2;
    // writeln("tmp", tmp);
    if (x > y)
    {
        cost3 = tmp + a * (max(x, y) - min(x, y));

    }
    else
    {
        cost4 = tmp + b * (max(x, y) - min(x, y));
    }
    // writeln(cost1);
    // writeln(cost2);
    // writeln(cost3);
    // writeln(cost4);

    if (cost3 == 0)
    {
        writeln(min(cost1, cost2, cost4));
    }
    if (cost4 == 0)
    {
        writeln(min(cost1, cost2, cost3));
    }

}

void scan(L...)(ref L A)
{
    auto l = readln.split;
    foreach (i, T; L)
    {
        A[i] = l[i].to!T;
    }
}
