import java.util.*;
public class Main {
    public static void main(String[] args) throws Exception {
        
        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();
		
        long price = 0;
        long price1 = 0;
        long price2 = 0;
        
        if(X<=Y){
            price1 = 2*C*X + B*(Y-X);
            price2 = 2*C*Y;
            price = Math.min(price1,price2);
        }else{
            price1 = 2*C*Y + A*(X-Y);
            price2 = 2*C*X;
            price = Math.min(price1,price2);
        }
        
        if(A*X+B*Y>=price){
            System.out.println(price);
        }else{
            System.out.println(A*X+B*Y);
        }
        
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        
        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();
		
        long price = 0;
        long price1 = 0;
        long price2 = 0;
        
        if(X<=Y){
            price1 = 2*C*X + B*(Y-X);
            price2 = 2*C*Y;
            price = Math.min(price1,price2);
        }else{
            price1 = 2*C*Y + A*(X-Y);
            price2 = 2*C*X;
            price = Math.min(price1,price2);
        }
        
        if(A*X+B*Y>=price){
            System.out.println(price);
        }else{
            System.out.println(A*X+B*Y);
        }
        
    }
} Main public static void main(String[] args) throws Exception {
        
        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();
		
        long price = 0;
        long price1 = 0;
        long price2 = 0;
        
        if(X<=Y){
            price1 = 2*C*X + B*(Y-X);
            price2 = 2*C*Y;
            price = Math.min(price1,price2);
        }else{
            price1 = 2*C*Y + A*(X-Y);
            price2 = 2*C*X;
            price = Math.min(price1,price2);
        }
        
        if(A*X+B*Y>=price){
            System.out.println(price);
        }else{
            System.out.println(A*X+B*Y);
        }
        
    } 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();
		
        long price = 0;
        long price1 = 0;
        long price2 = 0;
        
        if(X<=Y){
            price1 = 2*C*X + B*(Y-X);
            price2 = 2*C*Y;
            price = Math.min(price1,price2);
        }else{
            price1 = 2*C*Y + A*(X-Y);
            price2 = 2*C*X;
            price = Math.min(price1,price2);
        }
        
        if(A*X+B*Y>=price){
            System.out.println(price);
        }else{
            System.out.println(A*X+B*Y);
        }
        
    } 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 long price = 0; price 0 long price1 = 0; price1 0 long price2 = 0; price2 0 if(X<=Y){
            price1 = 2*C*X + B*(Y-X);
            price2 = 2*C*Y;
            price = Math.min(price1,price2);
        }else{
            price1 = 2*C*Y + A*(X-Y);
            price2 = 2*C*X;
            price = Math.min(price1,price2);
        } X<=Y X Y {
            price1 = 2*C*X + B*(Y-X);
            price2 = 2*C*Y;
            price = Math.min(price1,price2);
        } price1 = 2*C*X + B*(Y-X) price1 2*C*X + B*(Y-X) 2*C*X 2*C*X 2 C X B*(Y-X) B (Y-X) Y X price2 = 2*C*Y price2 2*C*Y 2*C*Y 2 C Y price = Math.min(price1,price2) price Math.min(price1,price2) Math.min Math price1 price2 {
            price1 = 2*C*Y + A*(X-Y);
            price2 = 2*C*X;
            price = Math.min(price1,price2);
        } price1 = 2*C*Y + A*(X-Y) price1 2*C*Y + A*(X-Y) 2*C*Y 2*C*Y 2 C Y A*(X-Y) A (X-Y) X Y price2 = 2*C*X price2 2*C*X 2*C*X 2 C X price = Math.min(price1,price2) price Math.min(price1,price2) Math.min Math price1 price2 if(A*X+B*Y>=price){
            System.out.println(price);
        }else{
            System.out.println(A*X+B*Y);
        } A*X+B*Y>=price A*X+B*Y A*X A X B*Y B Y price {
            System.out.println(price);
        } System.out.println(price) System.out.println System.out System System.out price {
            System.out.println(A*X+B*Y);
        } System.out.println(A*X+B*Y) System.out.println System.out System System.out A*X+B*Y A*X A X B*Y B Y String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        
        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();
		
        long price = 0;
        long price1 = 0;
        long price2 = 0;
        
        if(X<=Y){
            price1 = 2*C*X + B*(Y-X);
            price2 = 2*C*Y;
            price = Math.min(price1,price2);
        }else{
            price1 = 2*C*Y + A*(X-Y);
            price2 = 2*C*X;
            price = Math.min(price1,price2);
        }
        
        if(A*X+B*Y>=price){
            System.out.println(price);
        }else{
            System.out.println(A*X+B*Y);
        }
        
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        
        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();
		
        long price = 0;
        long price1 = 0;
        long price2 = 0;
        
        if(X<=Y){
            price1 = 2*C*X + B*(Y-X);
            price2 = 2*C*Y;
            price = Math.min(price1,price2);
        }else{
            price1 = 2*C*Y + A*(X-Y);
            price2 = 2*C*X;
            price = Math.min(price1,price2);
        }
        
        if(A*X+B*Y>=price){
            System.out.println(price);
        }else{
            System.out.println(A*X+B*Y);
        }
        
    }
} Main
import java.util.*;
public class Main {
    public static void main(String[] args) throws Exception {
        
        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();
		
        long price = 0;
        long price1 = 0;
        long price2 = 0;
        
        if(X<=Y){
            price1 = 2*C*X + B*(Y-X);
            price2 = 2*C*Y;
            price = Math.min(price1,price2);
        }else{
            price1 = 2*C*Y + A*(X-Y);
            price2 = 2*C*X;
            price = Math.min(price1,price2);
        }
        
        if(A*X+B*Y>=price){
            System.out.println(price);
        }else{
            System.out.println(A*X+B*Y);
        }
        
    }
}