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

namespace Atcoder {
    class Program {
        static void Main(string[] args) {
            var N = Input.IntArr;
            var A = N[0];
            var B = N[1];
            var C = N[2];
            var X = N[3];
            var Y = N[4];

            var money = 0;

            if (A + B > 2 * C) {
                money += 2 * C * min(X, Y);
                if (X < Y)
                    money += (Y - X) * min(B,2*C);
                else
                    money += (X - Y) * min( A,2*C);
            } else {
                money += X * min(A,2*C);
                money += Y * min( B,2*C);
            }


            Console.WriteLine(money);
            return;
        }

        static long max(long left, long right) {
            if (left >= right)
                return left;
            return right;
        }

        static int min(int left,int right) {
            if (left >= right)
                return right;
            return left;
        }

        static long Kumiawase(int n, int r) {
            return Getkaijo(n) / (Getkaijo(n - r) * Getkaijo(r));

        }

        static long Getkaijo(int n) {
            if (n == 1)
                return n;
            return n * Getkaijo(n - 1);
        }
    }

    public static class Input {
        public static string Str => Console.ReadLine().Trim();
        public static int Int => int.Parse(Str);
        public static long Long => long.Parse(Str);
        public static double Double => double.Parse(Str);

        public static string[] StrArr => Str.Split(new[] { ' ' }, System.StringSplitOptions.RemoveEmptyEntries).ToArray();
        public static int[] IntArr => StrArr.Select(int.Parse).ToArray();
        public static double[] DoubleArr => StrArr.Select(double.Parse).ToArray();
        public static long[] LongArr => StrArr.Select(long.Parse).ToArray();

        public static List<string> StrList => Str.Split(new[] { ' ' }, System.StringSplitOptions.RemoveEmptyEntries).ToList();
        public static List<int> IntList => StrArr.Select(int.Parse).ToList();
        public static List<double> DoubleList => StrArr.Select(double.Parse).ToList();
        public static List<long> LongList => StrArr.Select(long.Parse).ToList();

        static bool eq<T, U>() => typeof(T).Equals(typeof(U));
        static T ct<T, U>(U a) => (T)Convert.ChangeType(a, typeof(T));
        static T cv<T>(string s) => eq<T, int>() ? ct<T, int>(int.Parse(s))
                            : eq<T, long>() ? ct<T, long>(long.Parse(s))
                            : eq<T, double>() ? ct<T, double>(double.Parse(s))
                            : eq<T, char>() ? ct<T, char>(s[0])
                                              : ct<T, string>(s);
        static void Multi<T>(out T a) => a = cv<T>(Str);
        static void Multi<T, U>(out T a, out U b) {
            var ar = StrArr; a = cv<T>(ar[0]); b = cv<U>(ar[1]);
        }
        static void Multi<T, U, V>(out T a, out U b, out V c) {
            var ar = StrArr; a = cv<T>(ar[0]); b = cv<U>(ar[1]); c = cv<V>(ar[2]);
        }

        static void Multi<T, U, V, W>(out T a, out U b, out V c, out W d) {
            var ar = StrArr; a = cv<T>(ar[0]); b = cv<U>(ar[1]); c = cv<V>(ar[2]); d = cv<W>(ar[3]);
        }
    }
}


Measured memory_bytes: 13396