using System;
using System.Diagnostics;
using System.IO;
using System.Text;
using System.Linq;
using System.Collections.Generic;
using System.Text.RegularExpressions;

class Program
{
    const string Yes = "Yes";
    const string No = "No";
    const long Mod = 1000000007;

    static void Main(string[] args) {
#if DEBUG
        MyDebugger.Test(process, "../TextFile1.txt");
#else
        object ret = process(new StreamReader(Console.OpenStandardInput()));
        Console.WriteLine(ret);
#endif
    }

    static object process(TextReader input) {
        var spl = input.ReadLine().Split(' ');
        var a = int.Parse(spl[0]);
        var b = int.Parse(spl[1]);
        var c = int.Parse(spl[2]);
        var x = int.Parse(spl[3]);
        var y = int.Parse(spl[4]);

        long min = long.MaxValue;

        for(int i = 0; i<Math.Max(x,y); i+=2) {
            long yen = c * i;

            int tmp = (x - i / 2);
            yen += a * (tmp > 0 ? tmp : 0);

            tmp = (y - i / 2);
            yen += b * (tmp > 0 ? tmp : 0);

            min = Math.Min(min, yen);
        }

        return min;
    }
}
