import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        final Scanner sc = new Scanner(System.in);

        final int A = sc.nextInt();
        final int B = sc.nextInt();
        final int C = sc.nextInt();
        final int X = sc.nextInt();
        final int Y = sc.nextInt();


        final int price = Math.min(C*2,A+B) * Math.min(X, Y);
        final int nokori = Math.max(X, Y) - Math.min(X, Y);
        if (X > Y) {
            System.out.println(price + Math.min(nokori*A, nokori*C*2));
        } else {
            System.out.println(price + Math.min(nokori*B, nokori*C*2));
        }
    }
} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {
        final Scanner sc = new Scanner(System.in);

        final int A = sc.nextInt();
        final int B = sc.nextInt();
        final int C = sc.nextInt();
        final int X = sc.nextInt();
        final int Y = sc.nextInt();


        final int price = Math.min(C*2,A+B) * Math.min(X, Y);
        final int nokori = Math.max(X, Y) - Math.min(X, Y);
        if (X > Y) {
            System.out.println(price + Math.min(nokori*A, nokori*C*2));
        } else {
            System.out.println(price + Math.min(nokori*B, nokori*C*2));
        }
    }
} Main public static void main(String[] args) {
        final Scanner sc = new Scanner(System.in);

        final int A = sc.nextInt();
        final int B = sc.nextInt();
        final int C = sc.nextInt();
        final int X = sc.nextInt();
        final int Y = sc.nextInt();


        final int price = Math.min(C*2,A+B) * Math.min(X, Y);
        final int nokori = Math.max(X, Y) - Math.min(X, Y);
        if (X > Y) {
            System.out.println(price + Math.min(nokori*A, nokori*C*2));
        } else {
            System.out.println(price + Math.min(nokori*B, nokori*C*2));
        }
    } main {
        final Scanner sc = new Scanner(System.in);

        final int A = sc.nextInt();
        final int B = sc.nextInt();
        final int C = sc.nextInt();
        final int X = sc.nextInt();
        final int Y = sc.nextInt();


        final int price = Math.min(C*2,A+B) * Math.min(X, Y);
        final int nokori = Math.max(X, Y) - Math.min(X, Y);
        if (X > Y) {
            System.out.println(price + Math.min(nokori*A, nokori*C*2));
        } else {
            System.out.println(price + Math.min(nokori*B, nokori*C*2));
        }
    } final Scanner sc = new Scanner(System.in); sc new Scanner(System.in) final int A = sc.nextInt(); A sc.nextInt() sc.nextInt sc final int B = sc.nextInt(); B sc.nextInt() sc.nextInt sc final int C = sc.nextInt(); C sc.nextInt() sc.nextInt sc final int X = sc.nextInt(); X sc.nextInt() sc.nextInt sc final int Y = sc.nextInt(); Y sc.nextInt() sc.nextInt sc final int price = Math.min(C*2,A+B) * Math.min(X, Y); price Math.min(C*2,A+B) * Math.min(X, Y) Math.min(C*2,A+B) Math.min Math C*2 C 2 A+B A B Math.min(X, Y) Math.min Math X Y final int nokori = Math.max(X, Y) - Math.min(X, Y); nokori Math.max(X, Y) - Math.min(X, Y) Math.max(X, Y) Math.max Math X Y Math.min(X, Y) Math.min Math X Y if (X > Y) {
            System.out.println(price + Math.min(nokori*A, nokori*C*2));
        } else {
            System.out.println(price + Math.min(nokori*B, nokori*C*2));
        } X > Y X Y {
            System.out.println(price + Math.min(nokori*A, nokori*C*2));
        } System.out.println(price + Math.min(nokori*A, nokori*C*2)) System.out.println System.out System System.out price + Math.min(nokori*A, nokori*C*2) price Math.min(nokori*A, nokori*C*2) Math.min Math nokori*A nokori A nokori*C*2 nokori*C*2 nokori C 2 {
            System.out.println(price + Math.min(nokori*B, nokori*C*2));
        } System.out.println(price + Math.min(nokori*B, nokori*C*2)) System.out.println System.out System System.out price + Math.min(nokori*B, nokori*C*2) price Math.min(nokori*B, nokori*C*2) Math.min Math nokori*B nokori B nokori*C*2 nokori*C*2 nokori C 2 String[] args args public class Main {

    public static void main(String[] args) {
        final Scanner sc = new Scanner(System.in);

        final int A = sc.nextInt();
        final int B = sc.nextInt();
        final int C = sc.nextInt();
        final int X = sc.nextInt();
        final int Y = sc.nextInt();


        final int price = Math.min(C*2,A+B) * Math.min(X, Y);
        final int nokori = Math.max(X, Y) - Math.min(X, Y);
        if (X > Y) {
            System.out.println(price + Math.min(nokori*A, nokori*C*2));
        } else {
            System.out.println(price + Math.min(nokori*B, nokori*C*2));
        }
    }
} public class Main {

    public static void main(String[] args) {
        final Scanner sc = new Scanner(System.in);

        final int A = sc.nextInt();
        final int B = sc.nextInt();
        final int C = sc.nextInt();
        final int X = sc.nextInt();
        final int Y = sc.nextInt();


        final int price = Math.min(C*2,A+B) * Math.min(X, Y);
        final int nokori = Math.max(X, Y) - Math.min(X, Y);
        if (X > Y) {
            System.out.println(price + Math.min(nokori*A, nokori*C*2));
        } else {
            System.out.println(price + Math.min(nokori*B, nokori*C*2));
        }
    }
} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        final Scanner sc = new Scanner(System.in);

        final int A = sc.nextInt();
        final int B = sc.nextInt();
        final int C = sc.nextInt();
        final int X = sc.nextInt();
        final int Y = sc.nextInt();


        final int price = Math.min(C*2,A+B) * Math.min(X, Y);
        final int nokori = Math.max(X, Y) - Math.min(X, Y);
        if (X > Y) {
            System.out.println(price + Math.min(nokori*A, nokori*C*2));
        } else {
            System.out.println(price + Math.min(nokori*B, nokori*C*2));
        }
    }
}
