using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;

class Program
{
    static void Main(string[] args)
    {
        var ABCXY = Console.ReadLine().Split().Select(int.Parse).ToArray();
        int A = ABCXY[0], B = ABCXY[1], C = ABCXY[2], X = ABCXY[3], Y = ABCXY[4];
        bool flgA = C * 2 < A, flgB = C * 2 < B, flgHalf = C < (A + B) / 2;
        if (flgA && flgB)
        {
            Console.WriteLine(C * Math.Max(X, Y) * 2);
        }
        else if (flgA)
        {
            Console.WriteLine(C * 2 * X + B * Math.Max(0, Y - X));
        }
        else if (flgB)
        {
            Console.WriteLine(C * 2 * Y + A * Math.Max(0, X - Y));
        }
        else if (flgHalf)
        {
            Console.WriteLine(C * 2 * Math.Min(X, Y) + (X > Y ? A : B) * Math.Abs(X - Y));
        }
        else
        {
            Console.WriteLine(A * X + B * Y);
        }
    }
}