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(v => long.Parse(v)).ToArray();
            var A = inputs[0];
            var B = inputs[1];
            var C = inputs[2];
            var X = inputs[3];
            var Y = inputs[4];
            var ab = (double)(A + B) / 2;

            long ans = 0;
            if (ab > C)
            {
                var min = Math.Min(X, Y);
                X -= min;
                Y -= min;
                ans += C * min * 2;
            }
            ans += X * A;
            ans += Y * B;

            ans = Math.Min(ans, C * Math.Max(X, Y) * 2);
            Console.WriteLine(ans);
        }
    }
}
