using System;
using System.Collections.Generic;

namespace MyProgram{
    class AtCoder{
        static void Main(){
            int[] input = Array.ConvertAll(Console.ReadLine().Split(' '),int.Parse);
            int A = input[0];
            int B = input[1];
            int C = input[2];
            int X = input[3];
            int Y = input[4];
            int min_price=A*X+B*Y;
            for(var i=0;i<=Math.Max(A,B);i++){
                int price = i*2*C + Math.Max(X-i,0) * A+ Math.Max(Y-i,0) * B;
                min_price = Math.Min(min_price,price);  
            }
            Console.WriteLine(min_price);

        }
    } 
}