using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
            var inputs = Console.ReadLine().Split(' ').Select(int.Parse);
            var A = inputs.ElementAt(0);
            var B = inputs.ElementAt(1);
            var C = inputs.ElementAt(2);
            var X = inputs.ElementAt(3);
            var Y = inputs.ElementAt(4);

            var AResult = 0;
            var BResult = 0;
            var ABResult = 0;

            // AB 🍕を買ったほうが安い場合
            if ((A + B) / 2 > C)
            {

                ABResult = Math.Min(X,Y) * 2;
                if (X > Y)
                {
                    AResult = X - ABResult / 2;
                }
                else
                {
                    BResult = Y - ABResult / 2;
                }
            }
            else
            {
                AResult = X;
                BResult = Y;
            }

            Console.WriteLine(AResult * A + BResult * B + ABResult * C);
        }
    }
}
