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

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

            //係数の調整
            X *= 2;
            Y *= 2;

            long ans = 0;

            int minCombine = Math.Min(A + B, 2 * C);

            if (X > Y) {
                ans += (Y / 2) * minCombine;
                ans += (X - Y) / 2 * A;
            } else {
                ans += (X / 2) * minCombine;
                ans += (Y - X) / 2 * B;
            }

            Console.WriteLine(ans);



        }
    }
}
