import java.util.Scanner;

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();
        long ans = 0;
        if(A+B > C*2){
            int c = Math.min(X, Y);
            ans += C * 2 * c;
            X -= c;
            Y -= c;
        }
        if(X > 0){
            if(A > C*2) ans += C * 2 * X;
            else ans += A * X;
        }
        if(Y > 0){
            if(B > C*2) ans += C * 2 * Y;
            else ans += B * Y;
        }
        System.out.println(ans);
        sc.close();

    }

} import java.util.Scanner; Scanner 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();
        long ans = 0;
        if(A+B > C*2){
            int c = Math.min(X, Y);
            ans += C * 2 * c;
            X -= c;
            Y -= c;
        }
        if(X > 0){
            if(A > C*2) ans += C * 2 * X;
            else ans += A * X;
        }
        if(Y > 0){
            if(B > C*2) ans += C * 2 * Y;
            else ans += B * Y;
        }
        System.out.println(ans);
        sc.close();

    }

} 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();
        long ans = 0;
        if(A+B > C*2){
            int c = Math.min(X, Y);
            ans += C * 2 * c;
            X -= c;
            Y -= c;
        }
        if(X > 0){
            if(A > C*2) ans += C * 2 * X;
            else ans += A * X;
        }
        if(Y > 0){
            if(B > C*2) ans += C * 2 * Y;
            else ans += B * Y;
        }
        System.out.println(ans);
        sc.close();

    } 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 ans = 0;
        if(A+B > C*2){
            int c = Math.min(X, Y);
            ans += C * 2 * c;
            X -= c;
            Y -= c;
        }
        if(X > 0){
            if(A > C*2) ans += C * 2 * X;
            else ans += A * X;
        }
        if(Y > 0){
            if(B > C*2) ans += C * 2 * Y;
            else ans += B * Y;
        }
        System.out.println(ans);
        sc.close();

    } 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 ans = 0; ans 0 if(A+B > C*2){
            int c = Math.min(X, Y);
            ans += C * 2 * c;
            X -= c;
            Y -= c;
        } A+B > C*2 A+B A B C*2 C 2 {
            int c = Math.min(X, Y);
            ans += C * 2 * c;
            X -= c;
            Y -= c;
        } int c = Math.min(X, Y); c Math.min(X, Y) Math.min Math X Y ans += C * 2 * c ans C * 2 * c C * 2 * c C 2 c X -= c X c Y -= c Y c if(X > 0){
            if(A > C*2) ans += C * 2 * X;
            else ans += A * X;
        } X > 0 X 0 {
            if(A > C*2) ans += C * 2 * X;
            else ans += A * X;
        } if(A > C*2) ans += C * 2 * X;
            else ans += A * X; A > C*2 A C*2 C 2 ans += C * 2 * X ans C * 2 * X C * 2 * X C 2 X ans += A * X ans A * X A X if(Y > 0){
            if(B > C*2) ans += C * 2 * Y;
            else ans += B * Y;
        } Y > 0 Y 0 {
            if(B > C*2) ans += C * 2 * Y;
            else ans += B * Y;
        } if(B > C*2) ans += C * 2 * Y;
            else ans += B * Y; B > C*2 B C*2 C 2 ans += C * 2 * Y ans C * 2 * Y C * 2 * Y C 2 Y ans += B * Y ans B * Y B Y System.out.println(ans) System.out.println System.out System System.out ans sc.close() sc.close sc 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();
        long ans = 0;
        if(A+B > C*2){
            int c = Math.min(X, Y);
            ans += C * 2 * c;
            X -= c;
            Y -= c;
        }
        if(X > 0){
            if(A > C*2) ans += C * 2 * X;
            else ans += A * X;
        }
        if(Y > 0){
            if(B > C*2) ans += C * 2 * Y;
            else ans += B * Y;
        }
        System.out.println(ans);
        sc.close();

    }

} 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();
        long ans = 0;
        if(A+B > C*2){
            int c = Math.min(X, Y);
            ans += C * 2 * c;
            X -= c;
            Y -= c;
        }
        if(X > 0){
            if(A > C*2) ans += C * 2 * X;
            else ans += A * X;
        }
        if(Y > 0){
            if(B > C*2) ans += C * 2 * Y;
            else ans += B * Y;
        }
        System.out.println(ans);
        sc.close();

    }

} Main
import java.util.Scanner;

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();
        long ans = 0;
        if(A+B > C*2){
            int c = Math.min(X, Y);
            ans += C * 2 * c;
            X -= c;
            Y -= c;
        }
        if(X > 0){
            if(A > C*2) ans += C * 2 * X;
            else ans += A * X;
        }
        if(Y > 0){
            if(B > C*2) ans += C * 2 * Y;
            else ans += B * Y;
        }
        System.out.println(ans);
        sc.close();

    }

}
