import java.util.*;
 
public class Main{

    public static void main(String args[]){
        Scanner sc = new Scanner(System.in);
        
        int A = sc.nextInt();
        int B = sc.nextInt();
        int C = sc.nextInt();
        int X = sc.nextInt();
        int Y = sc.nextInt();
        sc.close();

        if(X <= Y){
            System.out.println(Math.min(A*X + B*Y, 
                                Math.min(2*C*X + (Y-X)*B, 
                                        2*C*Y)));

        } else {
            System.out.println(Math.min(A*X + B*Y, 
                                Math.min(2*C*Y + (X-Y)*A, 
                                        2*C*X)));
        }
    }
} import java.util.*; util.* java public class Main{

    public static void main(String args[]){
        Scanner sc = new Scanner(System.in);
        
        int A = sc.nextInt();
        int B = sc.nextInt();
        int C = sc.nextInt();
        int X = sc.nextInt();
        int Y = sc.nextInt();
        sc.close();

        if(X <= Y){
            System.out.println(Math.min(A*X + B*Y, 
                                Math.min(2*C*X + (Y-X)*B, 
                                        2*C*Y)));

        } else {
            System.out.println(Math.min(A*X + B*Y, 
                                Math.min(2*C*Y + (X-Y)*A, 
                                        2*C*X)));
        }
    }
} Main public static void main(String args[]){
        Scanner sc = new Scanner(System.in);
        
        int A = sc.nextInt();
        int B = sc.nextInt();
        int C = sc.nextInt();
        int X = sc.nextInt();
        int Y = sc.nextInt();
        sc.close();

        if(X <= Y){
            System.out.println(Math.min(A*X + B*Y, 
                                Math.min(2*C*X + (Y-X)*B, 
                                        2*C*Y)));

        } else {
            System.out.println(Math.min(A*X + B*Y, 
                                Math.min(2*C*Y + (X-Y)*A, 
                                        2*C*X)));
        }
    } main {
        Scanner sc = new Scanner(System.in);
        
        int A = sc.nextInt();
        int B = sc.nextInt();
        int C = sc.nextInt();
        int X = sc.nextInt();
        int Y = sc.nextInt();
        sc.close();

        if(X <= Y){
            System.out.println(Math.min(A*X + B*Y, 
                                Math.min(2*C*X + (Y-X)*B, 
                                        2*C*Y)));

        } else {
            System.out.println(Math.min(A*X + B*Y, 
                                Math.min(2*C*Y + (X-Y)*A, 
                                        2*C*X)));
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int A = sc.nextInt(); A sc.nextInt() sc.nextInt sc int B = sc.nextInt(); B sc.nextInt() sc.nextInt sc int C = sc.nextInt(); C sc.nextInt() sc.nextInt sc int X = sc.nextInt(); X sc.nextInt() sc.nextInt sc int Y = sc.nextInt(); Y sc.nextInt() sc.nextInt sc sc.close() sc.close sc if(X <= Y){
            System.out.println(Math.min(A*X + B*Y, 
                                Math.min(2*C*X + (Y-X)*B, 
                                        2*C*Y)));

        } else {
            System.out.println(Math.min(A*X + B*Y, 
                                Math.min(2*C*Y + (X-Y)*A, 
                                        2*C*X)));
        } X <= Y X Y {
            System.out.println(Math.min(A*X + B*Y, 
                                Math.min(2*C*X + (Y-X)*B, 
                                        2*C*Y)));

        } System.out.println(Math.min(A*X + B*Y, 
                                Math.min(2*C*X + (Y-X)*B, 
                                        2*C*Y))) System.out.println System.out System System.out Math.min(A*X + B*Y, 
                                Math.min(2*C*X + (Y-X)*B, 
                                        2*C*Y)) Math.min Math A*X + B*Y A*X A X B*Y B Y Math.min(2*C*X + (Y-X)*B, 
                                        2*C*Y) Math.min Math 2*C*X + (Y-X)*B 2*C*X 2*C*X 2 C X (Y-X)*B (Y-X) Y X B 2*C*Y 2*C*Y 2 C Y {
            System.out.println(Math.min(A*X + B*Y, 
                                Math.min(2*C*Y + (X-Y)*A, 
                                        2*C*X)));
        } System.out.println(Math.min(A*X + B*Y, 
                                Math.min(2*C*Y + (X-Y)*A, 
                                        2*C*X))) System.out.println System.out System System.out Math.min(A*X + B*Y, 
                                Math.min(2*C*Y + (X-Y)*A, 
                                        2*C*X)) Math.min Math A*X + B*Y A*X A X B*Y B Y Math.min(2*C*Y + (X-Y)*A, 
                                        2*C*X) Math.min Math 2*C*Y + (X-Y)*A 2*C*Y 2*C*Y 2 C Y (X-Y)*A (X-Y) X Y A 2*C*X 2*C*X 2 C X String args[] args public class Main{

    public static void main(String args[]){
        Scanner sc = new Scanner(System.in);
        
        int A = sc.nextInt();
        int B = sc.nextInt();
        int C = sc.nextInt();
        int X = sc.nextInt();
        int Y = sc.nextInt();
        sc.close();

        if(X <= Y){
            System.out.println(Math.min(A*X + B*Y, 
                                Math.min(2*C*X + (Y-X)*B, 
                                        2*C*Y)));

        } else {
            System.out.println(Math.min(A*X + B*Y, 
                                Math.min(2*C*Y + (X-Y)*A, 
                                        2*C*X)));
        }
    }
} public class Main{

    public static void main(String args[]){
        Scanner sc = new Scanner(System.in);
        
        int A = sc.nextInt();
        int B = sc.nextInt();
        int C = sc.nextInt();
        int X = sc.nextInt();
        int Y = sc.nextInt();
        sc.close();

        if(X <= Y){
            System.out.println(Math.min(A*X + B*Y, 
                                Math.min(2*C*X + (Y-X)*B, 
                                        2*C*Y)));

        } else {
            System.out.println(Math.min(A*X + B*Y, 
                                Math.min(2*C*Y + (X-Y)*A, 
                                        2*C*X)));
        }
    }
} Main
import java.util.*;
 
public class Main{

    public static void main(String args[]){
        Scanner sc = new Scanner(System.in);
        
        int A = sc.nextInt();
        int B = sc.nextInt();
        int C = sc.nextInt();
        int X = sc.nextInt();
        int Y = sc.nextInt();
        sc.close();

        if(X <= Y){
            System.out.println(Math.min(A*X + B*Y, 
                                Math.min(2*C*X + (Y-X)*B, 
                                        2*C*Y)));

        } else {
            System.out.println(Math.min(A*X + B*Y, 
                                Math.min(2*C*Y + (X-Y)*A, 
                                        2*C*X)));
        }
    }
}