
import java.util.Scanner;
import java.lang.Math;

public class Main {

    public static void main(String[] args) {
	// write your code here
        Scanner scanner=new Scanner(System.in);
        int A=scanner.nextInt();
        int B=scanner.nextInt();
        int C=scanner.nextInt();
        int X=scanner.nextInt();
        int Y=scanner.nextInt();
        long min=Long.MAX_VALUE;
        for(int i=0;i<=Math.max(X,Y);i++){
            long price=Math.max(0,X-i)*A+Math.max(0,Y-i)*B+2*C*i;
            if(price<min){
                min=price;
            }
        }
        System.out.println(min);

    }
} import java.util.Scanner; Scanner java.util import java.lang.Math; Math java.lang public class Main {

    public static void main(String[] args) {
	// write your code here
        Scanner scanner=new Scanner(System.in);
        int A=scanner.nextInt();
        int B=scanner.nextInt();
        int C=scanner.nextInt();
        int X=scanner.nextInt();
        int Y=scanner.nextInt();
        long min=Long.MAX_VALUE;
        for(int i=0;i<=Math.max(X,Y);i++){
            long price=Math.max(0,X-i)*A+Math.max(0,Y-i)*B+2*C*i;
            if(price<min){
                min=price;
            }
        }
        System.out.println(min);

    }
} Main public static void main(String[] args) {
	// write your code here
        Scanner scanner=new Scanner(System.in);
        int A=scanner.nextInt();
        int B=scanner.nextInt();
        int C=scanner.nextInt();
        int X=scanner.nextInt();
        int Y=scanner.nextInt();
        long min=Long.MAX_VALUE;
        for(int i=0;i<=Math.max(X,Y);i++){
            long price=Math.max(0,X-i)*A+Math.max(0,Y-i)*B+2*C*i;
            if(price<min){
                min=price;
            }
        }
        System.out.println(min);

    } main {
	// write your code here
        Scanner scanner=new Scanner(System.in);
        int A=scanner.nextInt();
        int B=scanner.nextInt();
        int C=scanner.nextInt();
        int X=scanner.nextInt();
        int Y=scanner.nextInt();
        long min=Long.MAX_VALUE;
        for(int i=0;i<=Math.max(X,Y);i++){
            long price=Math.max(0,X-i)*A+Math.max(0,Y-i)*B+2*C*i;
            if(price<min){
                min=price;
            }
        }
        System.out.println(min);

    } Scanner scanner=new Scanner(System.in); scanner new Scanner(System.in) int A=scanner.nextInt(); A scanner.nextInt() scanner.nextInt scanner int B=scanner.nextInt(); B scanner.nextInt() scanner.nextInt scanner int C=scanner.nextInt(); C scanner.nextInt() scanner.nextInt scanner int X=scanner.nextInt(); X scanner.nextInt() scanner.nextInt scanner int Y=scanner.nextInt(); Y scanner.nextInt() scanner.nextInt scanner long min=Long.MAX_VALUE; min Long.MAX_VALUE Long Long.MAX_VALUE for(int i=0;i<=Math.max(X,Y);i++){
            long price=Math.max(0,X-i)*A+Math.max(0,Y-i)*B+2*C*i;
            if(price<min){
                min=price;
            }
        } int i=0; int i=0; i 0 i<=Math.max(X,Y) i Math.max(X,Y) Math.max Math X Y i++ i++ i {
            long price=Math.max(0,X-i)*A+Math.max(0,Y-i)*B+2*C*i;
            if(price<min){
                min=price;
            }
        } {
            long price=Math.max(0,X-i)*A+Math.max(0,Y-i)*B+2*C*i;
            if(price<min){
                min=price;
            }
        } long price=Math.max(0,X-i)*A+Math.max(0,Y-i)*B+2*C*i; price Math.max(0,X-i)*A+Math.max(0,Y-i)*B+2*C*i Math.max(0,X-i)*A+Math.max(0,Y-i)*B+2*C*i Math.max(0,X-i)*A Math.max(0,X-i) Math.max Math 0 X-i X i A Math.max(0,Y-i)*B Math.max(0,Y-i) Math.max Math 0 Y-i Y i B 2*C*i 2*C*i 2 C i if(price<min){
                min=price;
            } price<min price min {
                min=price;
            } min=price min price System.out.println(min) System.out.println System.out System System.out min String[] args args public class Main {

    public static void main(String[] args) {
	// write your code here
        Scanner scanner=new Scanner(System.in);
        int A=scanner.nextInt();
        int B=scanner.nextInt();
        int C=scanner.nextInt();
        int X=scanner.nextInt();
        int Y=scanner.nextInt();
        long min=Long.MAX_VALUE;
        for(int i=0;i<=Math.max(X,Y);i++){
            long price=Math.max(0,X-i)*A+Math.max(0,Y-i)*B+2*C*i;
            if(price<min){
                min=price;
            }
        }
        System.out.println(min);

    }
} public class Main {

    public static void main(String[] args) {
	// write your code here
        Scanner scanner=new Scanner(System.in);
        int A=scanner.nextInt();
        int B=scanner.nextInt();
        int C=scanner.nextInt();
        int X=scanner.nextInt();
        int Y=scanner.nextInt();
        long min=Long.MAX_VALUE;
        for(int i=0;i<=Math.max(X,Y);i++){
            long price=Math.max(0,X-i)*A+Math.max(0,Y-i)*B+2*C*i;
            if(price<min){
                min=price;
            }
        }
        System.out.println(min);

    }
} Main

import java.util.Scanner;
import java.lang.Math;

public class Main {

    public static void main(String[] args) {
	// write your code here
        Scanner scanner=new Scanner(System.in);
        int A=scanner.nextInt();
        int B=scanner.nextInt();
        int C=scanner.nextInt();
        int X=scanner.nextInt();
        int Y=scanner.nextInt();
        long min=Long.MAX_VALUE;
        for(int i=0;i<=Math.max(X,Y);i++){
            long price=Math.max(0,X-i)*A+Math.max(0,Y-i)*B+2*C*i;
            if(price<min){
                min=price;
            }
        }
        System.out.println(min);

    }
}
