void main()
{
    long[] tmp = readln.split.to!(long[]);
    long a = tmp[0], b = tmp[1], c = tmp[2];
    long x = tmp[3], y = tmp[4];

    if (a + b < 2 * c)
    {
        writeln(a * x + b * y);
    }
    else
    {
        long z = min(x, y);
        long u = a * (x - z) + b * (y - z);
        long v = 2 * c * (max(x, y) - z);
        writeln(2 * c * z + min(u, v));
    }
}

import std.stdio;
import std.string;
import std.array;
import std.conv;
import std.algorithm;
import std.range;
import std.math;
import std.numeric;
import std.container;
import std.typecons;
import std.ascii;
import std.uni;