import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        try (Scanner in = new Scanner(System.in)) {
            int A = in.nextInt();
            int B = in.nextInt();
            int C = in.nextInt();
            int X = in.nextInt();
            int Y = in.nextInt();

            int min = (int) 1e9;
            int maxXY = 2 * Math.max(X, Y) + 2;
            for (int c = 0; c < maxXY; c += 2) {
                int a = Math.max(0, X - c / 2);
                int b = Math.max(0, Y - c / 2);
                min = Math.min(min, A * a + B * b + C * c);
            }

            System.out.println(min);
        }
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        try (Scanner in = new Scanner(System.in)) {
            int A = in.nextInt();
            int B = in.nextInt();
            int C = in.nextInt();
            int X = in.nextInt();
            int Y = in.nextInt();

            int min = (int) 1e9;
            int maxXY = 2 * Math.max(X, Y) + 2;
            for (int c = 0; c < maxXY; c += 2) {
                int a = Math.max(0, X - c / 2);
                int b = Math.max(0, Y - c / 2);
                min = Math.min(min, A * a + B * b + C * c);
            }

            System.out.println(min);
        }
    }
} Main public static void main(String[] args) {
        try (Scanner in = new Scanner(System.in)) {
            int A = in.nextInt();
            int B = in.nextInt();
            int C = in.nextInt();
            int X = in.nextInt();
            int Y = in.nextInt();

            int min = (int) 1e9;
            int maxXY = 2 * Math.max(X, Y) + 2;
            for (int c = 0; c < maxXY; c += 2) {
                int a = Math.max(0, X - c / 2);
                int b = Math.max(0, Y - c / 2);
                min = Math.min(min, A * a + B * b + C * c);
            }

            System.out.println(min);
        }
    } main {
        try (Scanner in = new Scanner(System.in)) {
            int A = in.nextInt();
            int B = in.nextInt();
            int C = in.nextInt();
            int X = in.nextInt();
            int Y = in.nextInt();

            int min = (int) 1e9;
            int maxXY = 2 * Math.max(X, Y) + 2;
            for (int c = 0; c < maxXY; c += 2) {
                int a = Math.max(0, X - c / 2);
                int b = Math.max(0, Y - c / 2);
                min = Math.min(min, A * a + B * b + C * c);
            }

            System.out.println(min);
        }
    } try (Scanner in = new Scanner(System.in)) {
            int A = in.nextInt();
            int B = in.nextInt();
            int C = in.nextInt();
            int X = in.nextInt();
            int Y = in.nextInt();

            int min = (int) 1e9;
            int maxXY = 2 * Math.max(X, Y) + 2;
            for (int c = 0; c < maxXY; c += 2) {
                int a = Math.max(0, X - c / 2);
                int b = Math.max(0, Y - c / 2);
                min = Math.min(min, A * a + B * b + C * c);
            }

            System.out.println(min);
        } {
            int A = in.nextInt();
            int B = in.nextInt();
            int C = in.nextInt();
            int X = in.nextInt();
            int Y = in.nextInt();

            int min = (int) 1e9;
            int maxXY = 2 * Math.max(X, Y) + 2;
            for (int c = 0; c < maxXY; c += 2) {
                int a = Math.max(0, X - c / 2);
                int b = Math.max(0, Y - c / 2);
                min = Math.min(min, A * a + B * b + C * c);
            }

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

            int min = (int) 1e9;
            int maxXY = 2 * Math.max(X, Y) + 2;
            for (int c = 0; c < maxXY; c += 2) {
                int a = Math.max(0, X - c / 2);
                int b = Math.max(0, Y - c / 2);
                min = Math.min(min, A * a + B * b + C * c);
            }

            System.out.println(min);
        }
    }
} public class Main {
    public static void main(String[] args) {
        try (Scanner in = new Scanner(System.in)) {
            int A = in.nextInt();
            int B = in.nextInt();
            int C = in.nextInt();
            int X = in.nextInt();
            int Y = in.nextInt();

            int min = (int) 1e9;
            int maxXY = 2 * Math.max(X, Y) + 2;
            for (int c = 0; c < maxXY; c += 2) {
                int a = Math.max(0, X - c / 2);
                int b = Math.max(0, Y - c / 2);
                min = Math.min(min, A * a + B * b + C * c);
            }

            System.out.println(min);
        }
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        try (Scanner in = new Scanner(System.in)) {
            int A = in.nextInt();
            int B = in.nextInt();
            int C = in.nextInt();
            int X = in.nextInt();
            int Y = in.nextInt();

            int min = (int) 1e9;
            int maxXY = 2 * Math.max(X, Y) + 2;
            for (int c = 0; c < maxXY; c += 2) {
                int a = Math.max(0, X - c / 2);
                int b = Math.max(0, Y - c / 2);
                min = Math.min(min, A * a + B * b + C * c);
            }

            System.out.println(min);
        }
    }
}
