using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Linq;
using System.Diagnostics;
using System.Globalization;
using static System.Console;
using static System.Math;


namespace abc95_c
{
    class Program
    {
        static void Main(string[] args)
        {
            int[] input = ReadLine().Split().Select(int.Parse).ToArray();
            int a = input[0];
            int b = input[1];
            int c = input[2];
            double x = input[3];
            double y = input[4];

            if(c*2 <= a && c*2 <= b)
            {
                var max = Max(x,y);
                WriteLine(c*2*max);
            }
            else if(c*2 >= a+b)
            {
                WriteLine(a*x+b*y);
            }
            else if(c <= b && c >= a)
            {
                if(x-y<0)
                {
                    WriteLine(c*2*y);
                }
                else
                {
                    WriteLine(c*2*y+(x-y)*a);
                }
            }
            else
            {
                if(y-x<0)
                {
                    WriteLine(c*2*x);
                }
                else
                {
                    WriteLine(c*2*x+(y-x)*b);
                }
            }
        }
    }
}