import static java.lang.Integer.parseInt;
import java.util.Scanner;

public class Main {
	
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String[] base = sc.nextLine().split(" "); //[A, B, C, X, Y];
        final int A = parseInt(base[0]);
        final int B = parseInt(base[1]);
        final int C = parseInt(base[2]);
        int X = parseInt(base[3]);
        int Y = parseInt(base[4]);
        
        if (useCpizza(A, B, C)) {
        	int totalCost = 0;
        	
        	while (X > 0 && Y > 0) {
        		totalCost += C * 2;
        		X--;
        		Y--;
        	}
        	
        	if(isBetterThan(A, C)) {
            	while (X > 0) {
            		totalCost += C * 2;
            		X--;
            	}
        	}

        	
        	if (isBetterThan(B, C)) {
            	while (Y > 0) {
            		totalCost += C * 2;
            		Y--;
            	}
        	}

        	System.out.print(totalCost + (A * X) + (B * Y));
        } else {
            System.out.println((X * A) + (Y * B));
        }
        

    }
    
    /**
     * Cピザが利用する価値があるかを判定
     * @param A
     * @param B
     * @param C
     * @return
     */
    public static boolean useCpizza(int A, int B, int C) {
    	return (A + B) > (C * 2);
    }
    
    /**
     * 対象を利用するよりCを利用したほうが安いか判定
     * @param target
     * @param C
     * @return
     */
    public static boolean isBetterThan(int target, int C) {
    	return target > (C * 2);
    }
} import static java.lang.Integer.parseInt; import static java.lang.Integer.parseInt; import static java.lang.Integer.parseInt; import java.util.Scanner; Scanner java.util public class Main {
	
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String[] base = sc.nextLine().split(" "); //[A, B, C, X, Y];
        final int A = parseInt(base[0]);
        final int B = parseInt(base[1]);
        final int C = parseInt(base[2]);
        int X = parseInt(base[3]);
        int Y = parseInt(base[4]);
        
        if (useCpizza(A, B, C)) {
        	int totalCost = 0;
        	
        	while (X > 0 && Y > 0) {
        		totalCost += C * 2;
        		X--;
        		Y--;
        	}
        	
        	if(isBetterThan(A, C)) {
            	while (X > 0) {
            		totalCost += C * 2;
            		X--;
            	}
        	}

        	
        	if (isBetterThan(B, C)) {
            	while (Y > 0) {
            		totalCost += C * 2;
            		Y--;
            	}
        	}

        	System.out.print(totalCost + (A * X) + (B * Y));
        } else {
            System.out.println((X * A) + (Y * B));
        }
        

    }
    
    /**
     * Cピザが利用する価値があるかを判定
     * @param A
     * @param B
     * @param C
     * @return
     */
    public static boolean useCpizza(int A, int B, int C) {
    	return (A + B) > (C * 2);
    }
    
    /**
     * 対象を利用するよりCを利用したほうが安いか判定
     * @param target
     * @param C
     * @return
     */
    public static boolean isBetterThan(int target, int C) {
    	return target > (C * 2);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String[] base = sc.nextLine().split(" "); //[A, B, C, X, Y];
        final int A = parseInt(base[0]);
        final int B = parseInt(base[1]);
        final int C = parseInt(base[2]);
        int X = parseInt(base[3]);
        int Y = parseInt(base[4]);
        
        if (useCpizza(A, B, C)) {
        	int totalCost = 0;
        	
        	while (X > 0 && Y > 0) {
        		totalCost += C * 2;
        		X--;
        		Y--;
        	}
        	
        	if(isBetterThan(A, C)) {
            	while (X > 0) {
            		totalCost += C * 2;
            		X--;
            	}
        	}

        	
        	if (isBetterThan(B, C)) {
            	while (Y > 0) {
            		totalCost += C * 2;
            		Y--;
            	}
        	}

        	System.out.print(totalCost + (A * X) + (B * Y));
        } else {
            System.out.println((X * A) + (Y * B));
        }
        

    } main {
        Scanner sc = new Scanner(System.in);
        String[] base = sc.nextLine().split(" "); //[A, B, C, X, Y];
        final int A = parseInt(base[0]);
        final int B = parseInt(base[1]);
        final int C = parseInt(base[2]);
        int X = parseInt(base[3]);
        int Y = parseInt(base[4]);
        
        if (useCpizza(A, B, C)) {
        	int totalCost = 0;
        	
        	while (X > 0 && Y > 0) {
        		totalCost += C * 2;
        		X--;
        		Y--;
        	}
        	
        	if(isBetterThan(A, C)) {
            	while (X > 0) {
            		totalCost += C * 2;
            		X--;
            	}
        	}

        	
        	if (isBetterThan(B, C)) {
            	while (Y > 0) {
            		totalCost += C * 2;
            		Y--;
            	}
        	}

        	System.out.print(totalCost + (A * X) + (B * Y));
        } else {
            System.out.println((X * A) + (Y * B));
        }
        

    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String[] base = sc.nextLine().split(" "); base sc.nextLine().split(" ") sc.nextLine().split sc.nextLine() sc.nextLine sc " " final int A = parseInt(base[0]); A parseInt(base[0]) parseInt base[0] base 0 final int B = parseInt(base[1]); B parseInt(base[1]) parseInt base[1] base 1 final int C = parseInt(base[2]); C parseInt(base[2]) parseInt base[2] base 2 int X = parseInt(base[3]); X parseInt(base[3]) parseInt base[3] base 3 int Y = parseInt(base[4]); Y parseInt(base[4]) parseInt base[4] base 4 if (useCpizza(A, B, C)) {
        	int totalCost = 0;
        	
        	while (X > 0 && Y > 0) {
        		totalCost += C * 2;
        		X--;
        		Y--;
        	}
        	
        	if(isBetterThan(A, C)) {
            	while (X > 0) {
            		totalCost += C * 2;
            		X--;
            	}
        	}

        	
        	if (isBetterThan(B, C)) {
            	while (Y > 0) {
            		totalCost += C * 2;
            		Y--;
            	}
        	}

        	System.out.print(totalCost + (A * X) + (B * Y));
        } else {
            System.out.println((X * A) + (Y * B));
        } useCpizza(A, B, C) useCpizza A B C {
        	int totalCost = 0;
        	
        	while (X > 0 && Y > 0) {
        		totalCost += C * 2;
        		X--;
        		Y--;
        	}
        	
        	if(isBetterThan(A, C)) {
            	while (X > 0) {
            		totalCost += C * 2;
            		X--;
            	}
        	}

        	
        	if (isBetterThan(B, C)) {
            	while (Y > 0) {
            		totalCost += C * 2;
            		Y--;
            	}
        	}

        	System.out.print(totalCost + (A * X) + (B * Y));
        } int totalCost = 0; totalCost 0 while (X > 0 && Y > 0) {
        		totalCost += C * 2;
        		X--;
        		Y--;
        	} X > 0 && Y > 0 X > 0 X 0 Y > 0 Y 0 {
        		totalCost += C * 2;
        		X--;
        		Y--;
        	} totalCost += C * 2 totalCost C * 2 C 2 X-- X Y-- Y if(isBetterThan(A, C)) {
            	while (X > 0) {
            		totalCost += C * 2;
            		X--;
            	}
        	} isBetterThan(A, C) isBetterThan A C {
            	while (X > 0) {
            		totalCost += C * 2;
            		X--;
            	}
        	} while (X > 0) {
            		totalCost += C * 2;
            		X--;
            	} X > 0 X 0 {
            		totalCost += C * 2;
            		X--;
            	} totalCost += C * 2 totalCost C * 2 C 2 X-- X if (isBetterThan(B, C)) {
            	while (Y > 0) {
            		totalCost += C * 2;
            		Y--;
            	}
        	} isBetterThan(B, C) isBetterThan B C {
            	while (Y > 0) {
            		totalCost += C * 2;
            		Y--;
            	}
        	} while (Y > 0) {
            		totalCost += C * 2;
            		Y--;
            	} Y > 0 Y 0 {
            		totalCost += C * 2;
            		Y--;
            	} totalCost += C * 2 totalCost C * 2 C 2 Y-- Y System.out.print(totalCost + (A * X) + (B * Y)) System.out.print System.out System System.out totalCost + (A * X) + (B * Y) totalCost + (A * X) + (B * Y) totalCost (A * X) A X (B * Y) B Y {
            System.out.println((X * A) + (Y * B));
        } System.out.println((X * A) + (Y * B)) System.out.println System.out System System.out (X * A) + (Y * B) (X * A) X A (Y * B) Y B String[] args args /**
     * Cピザが利用する価値があるかを判定
     * @param A
     * @param B
     * @param C
     * @return
     */
    public static boolean useCpizza(int A, int B, int C) {
    	return (A + B) > (C * 2);
    } useCpizza {
    	return (A + B) > (C * 2);
    } return (A + B) > (C * 2); (A + B) > (C * 2) (A + B) A B (C * 2) C 2 int A A int B B int C C /**
     * 対象を利用するよりCを利用したほうが安いか判定
     * @param target
     * @param C
     * @return
     */
    public static boolean isBetterThan(int target, int C) {
    	return target > (C * 2);
    } isBetterThan {
    	return target > (C * 2);
    } return target > (C * 2); target > (C * 2) target (C * 2) C 2 int target target int C C public class Main {
	
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String[] base = sc.nextLine().split(" "); //[A, B, C, X, Y];
        final int A = parseInt(base[0]);
        final int B = parseInt(base[1]);
        final int C = parseInt(base[2]);
        int X = parseInt(base[3]);
        int Y = parseInt(base[4]);
        
        if (useCpizza(A, B, C)) {
        	int totalCost = 0;
        	
        	while (X > 0 && Y > 0) {
        		totalCost += C * 2;
        		X--;
        		Y--;
        	}
        	
        	if(isBetterThan(A, C)) {
            	while (X > 0) {
            		totalCost += C * 2;
            		X--;
            	}
        	}

        	
        	if (isBetterThan(B, C)) {
            	while (Y > 0) {
            		totalCost += C * 2;
            		Y--;
            	}
        	}

        	System.out.print(totalCost + (A * X) + (B * Y));
        } else {
            System.out.println((X * A) + (Y * B));
        }
        

    }
    
    /**
     * Cピザが利用する価値があるかを判定
     * @param A
     * @param B
     * @param C
     * @return
     */
    public static boolean useCpizza(int A, int B, int C) {
    	return (A + B) > (C * 2);
    }
    
    /**
     * 対象を利用するよりCを利用したほうが安いか判定
     * @param target
     * @param C
     * @return
     */
    public static boolean isBetterThan(int target, int C) {
    	return target > (C * 2);
    }
} public class Main {
	
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String[] base = sc.nextLine().split(" "); //[A, B, C, X, Y];
        final int A = parseInt(base[0]);
        final int B = parseInt(base[1]);
        final int C = parseInt(base[2]);
        int X = parseInt(base[3]);
        int Y = parseInt(base[4]);
        
        if (useCpizza(A, B, C)) {
        	int totalCost = 0;
        	
        	while (X > 0 && Y > 0) {
        		totalCost += C * 2;
        		X--;
        		Y--;
        	}
        	
        	if(isBetterThan(A, C)) {
            	while (X > 0) {
            		totalCost += C * 2;
            		X--;
            	}
        	}

        	
        	if (isBetterThan(B, C)) {
            	while (Y > 0) {
            		totalCost += C * 2;
            		Y--;
            	}
        	}

        	System.out.print(totalCost + (A * X) + (B * Y));
        } else {
            System.out.println((X * A) + (Y * B));
        }
        

    }
    
    /**
     * Cピザが利用する価値があるかを判定
     * @param A
     * @param B
     * @param C
     * @return
     */
    public static boolean useCpizza(int A, int B, int C) {
    	return (A + B) > (C * 2);
    }
    
    /**
     * 対象を利用するよりCを利用したほうが安いか判定
     * @param target
     * @param C
     * @return
     */
    public static boolean isBetterThan(int target, int C) {
    	return target > (C * 2);
    }
} Main
import static java.lang.Integer.parseInt;
import java.util.Scanner;

public class Main {
	
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String[] base = sc.nextLine().split(" "); //[A, B, C, X, Y];
        final int A = parseInt(base[0]);
        final int B = parseInt(base[1]);
        final int C = parseInt(base[2]);
        int X = parseInt(base[3]);
        int Y = parseInt(base[4]);
        
        if (useCpizza(A, B, C)) {
        	int totalCost = 0;
        	
        	while (X > 0 && Y > 0) {
        		totalCost += C * 2;
        		X--;
        		Y--;
        	}
        	
        	if(isBetterThan(A, C)) {
            	while (X > 0) {
            		totalCost += C * 2;
            		X--;
            	}
        	}

        	
        	if (isBetterThan(B, C)) {
            	while (Y > 0) {
            		totalCost += C * 2;
            		Y--;
            	}
        	}

        	System.out.print(totalCost + (A * X) + (B * Y));
        } else {
            System.out.println((X * A) + (Y * B));
        }
        

    }
    
    /**
     * Cピザが利用する価値があるかを判定
     * @param A
     * @param B
     * @param C
     * @return
     */
    public static boolean useCpizza(int A, int B, int C) {
    	return (A + B) > (C * 2);
    }
    
    /**
     * 対象を利用するよりCを利用したほうが安いか判定
     * @param target
     * @param C
     * @return
     */
    public static boolean isBetterThan(int target, int C) {
    	return target > (C * 2);
    }
}