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

namespace AtCoder
{
    class Program
    {
        static void Main(string[] args)
        {
            var vals = Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToArray();
            var A = (long)vals[0];
            var B = (long)vals[1];
            var C = (long)vals[2];
            var X = (long)vals[3];
            var Y = (long)vals[4];

            var middle = (double)(A + B) / 2.0;
            long price;

            if (C > middle)
            {
                price = A * X + B * Y;
            }
            else if (C < A / 2.0 && C < B / 2.0)
            {
                price = C * Math.Max(X, Y) * 2;
            }
            else
            {
                price = C * Math.Min(X, Y) * 2;
                if (X >= Y)
                {
                    price += A * (X - Y);
                }
                else
                {
                    price += B * (Y - X);
                }
            }

            Console.WriteLine(price);
        }
    }

}
