using System;
using System.Collections.Generic;

namespace cswork
{

    class Program
    {
        public Program() { }

        Scanner cin;

        void Omame()
        {
            cin = new Scanner();

            int a = cin.nextInt();
            int b = cin.nextInt();
            int c = cin.nextInt();
            int x = cin.nextInt();
            int y = cin.nextInt();

            int roopX = x;
            int roopY = y;
            if (a >= c * 2)
            {
                roopX = 0;
            }
            if (b >= c * 2)
            {
                roopY = 0;
            }

            int ans = int.MaxValue;
            for (int i = 0; i <= roopX; i++)
            {
                for (int j = 0; j <= roopY; j++)
                {
                    int k1 = (x - i) * 2;
                    int k2 = (y - j) * 2;
                    int k = Math.Max(k1, k2);

                    int value = a * i + b * j + c * k;

                    ans = Math.Min(ans, value);
                }
            }

            Console.WriteLine(ans);
        }

        static void Main(string[] args)
        {
            new Program().Omame();
        }
    }

    class Scanner
    {
        string[] s;
        int i;

        char[] cs = new char[] { ' ' };

        public Scanner()
        {
            s = new string[0];
            i = 0;
        }

        public string next()
        {
            if (i < s.Length) return s[i++];
            string st = Console.ReadLine();
            while (st == "") st = Console.ReadLine();

            s = st.Split(cs, StringSplitOptions.RemoveEmptyEntries);
            i = 0;
            return next();
        }

        public int nextInt()
        {
            return int.Parse(next());
        }

        public long nextLong()
        {
            return long.Parse(next());
        }

        public double nextDouble()
        {
            return double.Parse(next());
        }
    }
}