using System;
using System.Linq;

namespace WA055C
{
    class Program
    {
        static void Main(string[] args)
        {
            var line = Console.ReadLine().Split(' ').ToArray();

            var A = int.Parse(line[0]); var B = int.Parse(line[1]); var C = int.Parse(line[2]);
            var X = int.Parse(line[3]); var Y = int.Parse(line[4]);

            int minCost = 100000000; int maxP = Math.Max(X, Y);

            for(var i = 0; i < maxP; i++)
            {
                int total = 0;

                total += i * 2 * C;

                int exA = X - i; int exB = Y - i;

                if(exA > 0)
                {
                    total += exA * A;
                }

                if(exB > 0)
                {
                    total += exB * B;
                }

                if(total < minCost)
                {
                    minCost = total;
                }
            }

            Console.WriteLine(minCost);
        }
    }
}
