import java.util.Scanner;

public class Main {
    public static void main(String args[]) {
        Scanner scan = new Scanner(System.in);
        int A = scan.nextInt();
        int B = scan.nextInt();
        int C = scan.nextInt();
        int X = scan.nextInt();
        int Y = scan.nextInt();
        if (Y < X) {
            int temp1 = A;
            int temp2 = X;
            A = B;
            B = temp1;
            X = Y;
            Y = temp2;
        }
        int type1 = A*X + B*Y;// all seperate
        int type2 = C*X*2 + (Y-X) * B;
        int type3 = C*Y*2;
        int answer = Math.min(type1, type2);
        answer = Math.min(answer,type3);
        System.out.println(answer);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String args[]) {
        Scanner scan = new Scanner(System.in);
        int A = scan.nextInt();
        int B = scan.nextInt();
        int C = scan.nextInt();
        int X = scan.nextInt();
        int Y = scan.nextInt();
        if (Y < X) {
            int temp1 = A;
            int temp2 = X;
            A = B;
            B = temp1;
            X = Y;
            Y = temp2;
        }
        int type1 = A*X + B*Y;// all seperate
        int type2 = C*X*2 + (Y-X) * B;
        int type3 = C*Y*2;
        int answer = Math.min(type1, type2);
        answer = Math.min(answer,type3);
        System.out.println(answer);
    }
} Main public static void main(String args[]) {
        Scanner scan = new Scanner(System.in);
        int A = scan.nextInt();
        int B = scan.nextInt();
        int C = scan.nextInt();
        int X = scan.nextInt();
        int Y = scan.nextInt();
        if (Y < X) {
            int temp1 = A;
            int temp2 = X;
            A = B;
            B = temp1;
            X = Y;
            Y = temp2;
        }
        int type1 = A*X + B*Y;// all seperate
        int type2 = C*X*2 + (Y-X) * B;
        int type3 = C*Y*2;
        int answer = Math.min(type1, type2);
        answer = Math.min(answer,type3);
        System.out.println(answer);
    } main {
        Scanner scan = new Scanner(System.in);
        int A = scan.nextInt();
        int B = scan.nextInt();
        int C = scan.nextInt();
        int X = scan.nextInt();
        int Y = scan.nextInt();
        if (Y < X) {
            int temp1 = A;
            int temp2 = X;
            A = B;
            B = temp1;
            X = Y;
            Y = temp2;
        }
        int type1 = A*X + B*Y;// all seperate
        int type2 = C*X*2 + (Y-X) * B;
        int type3 = C*Y*2;
        int answer = Math.min(type1, type2);
        answer = Math.min(answer,type3);
        System.out.println(answer);
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int A = scan.nextInt(); A scan.nextInt() scan.nextInt scan int B = scan.nextInt(); B scan.nextInt() scan.nextInt scan int C = scan.nextInt(); C scan.nextInt() scan.nextInt scan int X = scan.nextInt(); X scan.nextInt() scan.nextInt scan int Y = scan.nextInt(); Y scan.nextInt() scan.nextInt scan if (Y < X) {
            int temp1 = A;
            int temp2 = X;
            A = B;
            B = temp1;
            X = Y;
            Y = temp2;
        } Y < X Y X {
            int temp1 = A;
            int temp2 = X;
            A = B;
            B = temp1;
            X = Y;
            Y = temp2;
        } int temp1 = A; temp1 A int temp2 = X; temp2 X A = B A B B = temp1 B temp1 X = Y X Y Y = temp2 Y temp2 int type1 = A*X + B*Y; type1 A*X + B*Y A*X A X B*Y B Y int type2 = C*X*2 + (Y-X) * B; type2 C*X*2 + (Y-X) * B C*X*2 C*X*2 C X 2 (Y-X) * B (Y-X) Y X B int type3 = C*Y*2; type3 C*Y*2 C*Y*2 C Y 2 int answer = Math.min(type1, type2); answer Math.min(type1, type2) Math.min Math type1 type2 answer = Math.min(answer,type3) answer Math.min(answer,type3) Math.min Math answer type3 System.out.println(answer) System.out.println System.out System System.out answer String args[] args public class Main {
    public static void main(String args[]) {
        Scanner scan = new Scanner(System.in);
        int A = scan.nextInt();
        int B = scan.nextInt();
        int C = scan.nextInt();
        int X = scan.nextInt();
        int Y = scan.nextInt();
        if (Y < X) {
            int temp1 = A;
            int temp2 = X;
            A = B;
            B = temp1;
            X = Y;
            Y = temp2;
        }
        int type1 = A*X + B*Y;// all seperate
        int type2 = C*X*2 + (Y-X) * B;
        int type3 = C*Y*2;
        int answer = Math.min(type1, type2);
        answer = Math.min(answer,type3);
        System.out.println(answer);
    }
} public class Main {
    public static void main(String args[]) {
        Scanner scan = new Scanner(System.in);
        int A = scan.nextInt();
        int B = scan.nextInt();
        int C = scan.nextInt();
        int X = scan.nextInt();
        int Y = scan.nextInt();
        if (Y < X) {
            int temp1 = A;
            int temp2 = X;
            A = B;
            B = temp1;
            X = Y;
            Y = temp2;
        }
        int type1 = A*X + B*Y;// all seperate
        int type2 = C*X*2 + (Y-X) * B;
        int type3 = C*Y*2;
        int answer = Math.min(type1, type2);
        answer = Math.min(answer,type3);
        System.out.println(answer);
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String args[]) {
        Scanner scan = new Scanner(System.in);
        int A = scan.nextInt();
        int B = scan.nextInt();
        int C = scan.nextInt();
        int X = scan.nextInt();
        int Y = scan.nextInt();
        if (Y < X) {
            int temp1 = A;
            int temp2 = X;
            A = B;
            B = temp1;
            X = Y;
            Y = temp2;
        }
        int type1 = A*X + B*Y;// all seperate
        int type2 = C*X*2 + (Y-X) * B;
        int type3 = C*Y*2;
        int answer = Math.min(type1, type2);
        answer = Math.min(answer,type3);
        System.out.println(answer);
    }
}
