import java.util.*;;

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();
        int ans = A * X + B * Y;

        for(int i=1; i<=Math.max(X, Y); i++){
            int sum = C * 2 * i + Math.max(0, X - i) * A + Math.max(0, Y - i) * B;
            ans = Math.min(ans, sum);
        }
        System.out.println(ans);
    }
} import java.util.*; util.* java 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();
        int ans = A * X + B * Y;

        for(int i=1; i<=Math.max(X, Y); i++){
            int sum = C * 2 * i + Math.max(0, X - i) * A + Math.max(0, Y - i) * B;
            ans = Math.min(ans, sum);
        }
        System.out.println(ans);
    }
} 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();
        int ans = A * X + B * Y;

        for(int i=1; i<=Math.max(X, Y); i++){
            int sum = C * 2 * i + Math.max(0, X - i) * A + Math.max(0, Y - i) * B;
            ans = Math.min(ans, sum);
        }
        System.out.println(ans);
    } 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();
        int ans = A * X + B * Y;

        for(int i=1; i<=Math.max(X, Y); i++){
            int sum = C * 2 * i + Math.max(0, X - i) * A + Math.max(0, Y - i) * B;
            ans = Math.min(ans, sum);
        }
        System.out.println(ans);
    } 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 int ans = A * X + B * Y; ans A * X + B * Y A * X A X B * Y B Y for(int i=1; i<=Math.max(X, Y); i++){
            int sum = C * 2 * i + Math.max(0, X - i) * A + Math.max(0, Y - i) * B;
            ans = Math.min(ans, sum);
        } int i=1; int i=1; i 1 i<=Math.max(X, Y) i Math.max(X, Y) Math.max Math X Y i++ i++ i {
            int sum = C * 2 * i + Math.max(0, X - i) * A + Math.max(0, Y - i) * B;
            ans = Math.min(ans, sum);
        } {
            int sum = C * 2 * i + Math.max(0, X - i) * A + Math.max(0, Y - i) * B;
            ans = Math.min(ans, sum);
        } int sum = C * 2 * i + Math.max(0, X - i) * A + Math.max(0, Y - i) * B; sum C * 2 * i + Math.max(0, X - i) * A + Math.max(0, Y - i) * B C * 2 * i + Math.max(0, X - i) * A + Math.max(0, Y - i) * B C * 2 * i C * 2 * i C 2 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 ans = Math.min(ans, sum) ans Math.min(ans, sum) Math.min Math ans sum System.out.println(ans) System.out.println System.out System System.out ans String[] args args
import java.util.*;;

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();
        int ans = A * X + B * Y;

        for(int i=1; i<=Math.max(X, Y); i++){
            int sum = C * 2 * i + Math.max(0, X - i) * A + Math.max(0, Y - i) * B;
            ans = Math.min(ans, sum);
        }
        System.out.println(ans);
    }
}