import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int A, B, C, X, Y;
        A = scanner.nextInt();
        B = scanner.nextInt();
        C = scanner.nextInt();
        X = scanner.nextInt();
        Y = scanner.nextInt();
        int ans = (int) 1e9;
        for (int i = 0; i < 2 * (X + Y) + 1; i = i + 2) {
            int ABpizza = i;
            int Apizza = Math.max(0, X - (i / 2));
            int Bpizza = Math.max(0, Y - (i / 2));
            ans = Math.min(ans, Apizza * A + Bpizza * B + ABpizza * C);
        }
        System.out.println(ans);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int A, B, C, X, Y;
        A = scanner.nextInt();
        B = scanner.nextInt();
        C = scanner.nextInt();
        X = scanner.nextInt();
        Y = scanner.nextInt();
        int ans = (int) 1e9;
        for (int i = 0; i < 2 * (X + Y) + 1; i = i + 2) {
            int ABpizza = i;
            int Apizza = Math.max(0, X - (i / 2));
            int Bpizza = Math.max(0, Y - (i / 2));
            ans = Math.min(ans, Apizza * A + Bpizza * B + ABpizza * C);
        }
        System.out.println(ans);
    }
} Main public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int A, B, C, X, Y;
        A = scanner.nextInt();
        B = scanner.nextInt();
        C = scanner.nextInt();
        X = scanner.nextInt();
        Y = scanner.nextInt();
        int ans = (int) 1e9;
        for (int i = 0; i < 2 * (X + Y) + 1; i = i + 2) {
            int ABpizza = i;
            int Apizza = Math.max(0, X - (i / 2));
            int Bpizza = Math.max(0, Y - (i / 2));
            ans = Math.min(ans, Apizza * A + Bpizza * B + ABpizza * C);
        }
        System.out.println(ans);
    } main {
        Scanner scanner = new Scanner(System.in);

        int A, B, C, X, Y;
        A = scanner.nextInt();
        B = scanner.nextInt();
        C = scanner.nextInt();
        X = scanner.nextInt();
        Y = scanner.nextInt();
        int ans = (int) 1e9;
        for (int i = 0; i < 2 * (X + Y) + 1; i = i + 2) {
            int ABpizza = i;
            int Apizza = Math.max(0, X - (i / 2));
            int Bpizza = Math.max(0, Y - (i / 2));
            ans = Math.min(ans, Apizza * A + Bpizza * B + ABpizza * C);
        }
        System.out.println(ans);
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int A A B B C C X X Y; Y A = scanner.nextInt() A scanner.nextInt() scanner.nextInt scanner B = scanner.nextInt() B scanner.nextInt() scanner.nextInt scanner C = scanner.nextInt() C scanner.nextInt() scanner.nextInt scanner X = scanner.nextInt() X scanner.nextInt() scanner.nextInt scanner Y = scanner.nextInt() Y scanner.nextInt() scanner.nextInt scanner int ans = (int) 1e9; ans (int) 1e9 for (int i = 0; i < 2 * (X + Y) + 1; i = i + 2) {
            int ABpizza = i;
            int Apizza = Math.max(0, X - (i / 2));
            int Bpizza = Math.max(0, Y - (i / 2));
            ans = Math.min(ans, Apizza * A + Bpizza * B + ABpizza * C);
        } int i = 0; int i = 0; i 0 i < 2 * (X + Y) + 1 i 2 * (X + Y) + 1 2 * (X + Y) 2 (X + Y) X Y 1 i = i + 2 i = i + 2 i i + 2 i 2 {
            int ABpizza = i;
            int Apizza = Math.max(0, X - (i / 2));
            int Bpizza = Math.max(0, Y - (i / 2));
            ans = Math.min(ans, Apizza * A + Bpizza * B + ABpizza * C);
        } {
            int ABpizza = i;
            int Apizza = Math.max(0, X - (i / 2));
            int Bpizza = Math.max(0, Y - (i / 2));
            ans = Math.min(ans, Apizza * A + Bpizza * B + ABpizza * C);
        } int ABpizza = i; ABpizza i int Apizza = Math.max(0, X - (i / 2)); Apizza Math.max(0, X - (i / 2)) Math.max Math 0 X - (i / 2) X (i / 2) i 2 int Bpizza = Math.max(0, Y - (i / 2)); Bpizza Math.max(0, Y - (i / 2)) Math.max Math 0 Y - (i / 2) Y (i / 2) i 2 ans = Math.min(ans, Apizza * A + Bpizza * B + ABpizza * C) ans Math.min(ans, Apizza * A + Bpizza * B + ABpizza * C) Math.min Math ans Apizza * A + Bpizza * B + ABpizza * C Apizza * A + Bpizza * B + ABpizza * C Apizza * A Apizza A Bpizza * B Bpizza B ABpizza * C ABpizza C System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int A, B, C, X, Y;
        A = scanner.nextInt();
        B = scanner.nextInt();
        C = scanner.nextInt();
        X = scanner.nextInt();
        Y = scanner.nextInt();
        int ans = (int) 1e9;
        for (int i = 0; i < 2 * (X + Y) + 1; i = i + 2) {
            int ABpizza = i;
            int Apizza = Math.max(0, X - (i / 2));
            int Bpizza = Math.max(0, Y - (i / 2));
            ans = Math.min(ans, Apizza * A + Bpizza * B + ABpizza * C);
        }
        System.out.println(ans);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int A, B, C, X, Y;
        A = scanner.nextInt();
        B = scanner.nextInt();
        C = scanner.nextInt();
        X = scanner.nextInt();
        Y = scanner.nextInt();
        int ans = (int) 1e9;
        for (int i = 0; i < 2 * (X + Y) + 1; i = i + 2) {
            int ABpizza = i;
            int Apizza = Math.max(0, X - (i / 2));
            int Bpizza = Math.max(0, Y - (i / 2));
            ans = Math.min(ans, Apizza * A + Bpizza * B + ABpizza * C);
        }
        System.out.println(ans);
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int A, B, C, X, Y;
        A = scanner.nextInt();
        B = scanner.nextInt();
        C = scanner.nextInt();
        X = scanner.nextInt();
        Y = scanner.nextInt();
        int ans = (int) 1e9;
        for (int i = 0; i < 2 * (X + Y) + 1; i = i + 2) {
            int ABpizza = i;
            int Apizza = Math.max(0, X - (i / 2));
            int Bpizza = Math.max(0, Y - (i / 2));
            ans = Math.min(ans, Apizza * A + Bpizza * B + ABpizza * C);
        }
        System.out.println(ans);
    }
}