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;

            var answers = new List<int>
            {
                A * X + B * Y,
                Math.Max(X, Y) * 2 * C,
                Math.Min(X, Y) * C + Math.Abs(X - Y) * (X > Y ? A : B)
            };
            Console.WriteLine(answers.Min());
        }
    }
}
