using System;
using System.Collections.Generic;
using System.Linq;
public class Hello{
    public static void Main(){
        var array = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();
        var A = array[0];
        var B = array[1];
        var C = array[2];
        var X = array[3];
        var Y = array[4];
        
        if(A + B <= C * 2){
            Console.WriteLine(A * X + B * Y);
        }else{
            if(X > Y){
                Console.WriteLine(C * Y * 2+ A * (X - Y));
            }else if(X == Y){
                Console.WriteLine(C * X);
            }else{
                Console.WriteLine(C * X * 2+ B * (Y - X));
            }
                
            
        }
        
        
    }
}
