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

class Progaram
{
    static void Main(string[] args)
    {
        var l = Console.ReadLine().Split(' ')
            .Select(x => Int32.Parse(x)).ToArray();
        var a = l[0]; var b = l[1]; var c = l[2]; var x = l[3]; var y = l[4];
        var res = 0L;
        var pizas = new List<Int32[]>();
        pizas.Add(new Int32[] { a, x });
        pizas.Add(new Int32[] { b, y });
        pizas = pizas.OrderBy(x => x[1]).ToList();
        if (a + b > c * 2)
        {
            res += c * pizas[0][1] * 2;
            if (pizas[1][0] > c * 2) res += c * (pizas[1][1] - pizas[0][1]) * 2;
            else res += pizas[1][0] * (pizas[1][1] - pizas[0][1]);
        }
        else
        {
            res += a * x + b * y;
        }
        Console.WriteLine(res);
    }
}