using System;
using System.IO;
using System.Linq;
using System.Collections.Generic;
using System.Text;

public class Program
{

    public void Proc()
    {
        int[] inpt = Reader.ReadLine().Split(' ').Select(a => int.Parse(a)).ToArray();

        this.ACost = inpt[0];
        this.BCost = inpt[1];
        this.CCost = inpt[2];

        this.NeedA = inpt[3];
        this.NeedB = inpt[4];

        int CBuy = GetAns(0, Math.Max(NeedA * 2, NeedB * 2));
        int ans = Calc(CBuy);
        Console.WriteLine(ans);
    }

    private int GetAns(int min, int max) {
        if(max-min<=8) {
            int minCnt = 0;
            int minTmp = int.MaxValue;
            for (int i = min; i <= max; i++) {
                int val = Calc(i);
                if(val < minTmp) {
                    minTmp = val;
                    minCnt = i;
                }
            }
            return minCnt;
        }

        int mid1 = min + (max - min) / 3;
        int mid2 = max - (max - min) / 3;

        int val1 = Calc(min);
        int val2 = Calc(mid1);
        int val3 = Calc(mid2);
        int val4 = Calc(max);

        int minVal = Math.Min(val1, Math.Min(val2, Math.Min(val3, val4)));

        if(val1 == minVal) {
            return GetAns(min, mid1);

        } else if(val2 == minVal) {
            return GetAns(min, mid2);
        } else if(val3 == minVal) {
            return GetAns(mid1, max);
        } else {
            return GetAns(mid2, max);
        }
    }

    private int Calc(int cnt) {
        int total = cnt * CCost;

        int subNeedA = NeedA - cnt / 2;
        int subNeedB = NeedB - cnt / 2;
        if(subNeedA > 0) {
            total += subNeedA * ACost;
        }
        if(subNeedB>0) {
            total += subNeedB * BCost;
        }
        return total;
    }

    private int ACost;
    private int BCost;
    private int CCost;

    private int NeedA;
    private int NeedB;





    public class Reader
    {
        static StringReader sr;
        public static bool IsDebug = false;
        public static string ReadLine()
        {
            if (IsDebug)
            {
                if (sr == null)
                {
                    sr = new StringReader(InputText.Trim());
                }
                return sr.ReadLine();
            }
            else
            {
                return Console.ReadLine();
            }
        }
        private static string InputText = @"




1500 2000 1600 3 2



";
    }

    public static void Main(string[] args)
    {
#if DEBUG
        Reader.IsDebug = true;
#endif
        Program prg = new Program();
        prg.Proc();
    }
}
