using System;
using System.Linq;
using System.Numerics;
using System.Collections.Generic;

namespace ForAtcoder
{
    class Program
    {
        static void Main(string[] args)
        {
            long price = 10000000;
            long[] inputLongArray = Console.ReadLine().Split(' ').Select(i => long.Parse(i)).ToArray();
            var a = inputLongArray[0];
            var b = inputLongArray[1];
            var c = inputLongArray[2];
            var x = inputLongArray[3];
            var y = inputLongArray[4];
            for (long i = 0; i <= x; i++)
            {
                for (long j = 0; j <= y; j++)
                {
                    long k = ( x - i >= y - j ? x - i : y - j);
                    if (price > a * i + b * j + 2 * c * k)
                    {
                        price = a * i + b * j + 2 * c * k;
                    }
                }
            }
            Console.WriteLine(price);
        }
    }
}