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 (var i = 0; i <= (x <= y ? x : y); i++)
            {
                if (price > i * 2 * c + (x - i) * a + (y - i) * b) price = i * 2 * c + (x - i) * a + (y - i) * b;
            }
            Console.WriteLine(price);
        }
    }
}