import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        @SuppressWarnings("resource")
        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();
        int min = Integer.MAX_VALUE;
        for (int i = 0 ; i <= x ; i++) {
            min = Math.min(min, a * i + c * 2 * (x - i) + b * (Math.max(0, y - (x - i))));
        }
        for (int i = 0 ; i <= y ; i++) {
            min = Math.min(min, b * i + c * 2 * (y - i) + a * (Math.max(0, x - (y - i))));
        }
        System.out.println(min);
    }

} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {
        @SuppressWarnings("resource")
        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();
        int min = Integer.MAX_VALUE;
        for (int i = 0 ; i <= x ; i++) {
            min = Math.min(min, a * i + c * 2 * (x - i) + b * (Math.max(0, y - (x - i))));
        }
        for (int i = 0 ; i <= y ; i++) {
            min = Math.min(min, b * i + c * 2 * (y - i) + a * (Math.max(0, x - (y - i))));
        }
        System.out.println(min);
    }

} Main public static void main(String[] args) {
        @SuppressWarnings("resource")
        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();
        int min = Integer.MAX_VALUE;
        for (int i = 0 ; i <= x ; i++) {
            min = Math.min(min, a * i + c * 2 * (x - i) + b * (Math.max(0, y - (x - i))));
        }
        for (int i = 0 ; i <= y ; i++) {
            min = Math.min(min, b * i + c * 2 * (y - i) + a * (Math.max(0, x - (y - i))));
        }
        System.out.println(min);
    } main {
        @SuppressWarnings("resource")
        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();
        int min = Integer.MAX_VALUE;
        for (int i = 0 ; i <= x ; i++) {
            min = Math.min(min, a * i + c * 2 * (x - i) + b * (Math.max(0, y - (x - i))));
        }
        for (int i = 0 ; i <= y ; i++) {
            min = Math.min(min, b * i + c * 2 * (y - i) + a * (Math.max(0, x - (y - i))));
        }
        System.out.println(min);
    } @SuppressWarnings("resource")
        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 int min = Integer.MAX_VALUE; min Integer.MAX_VALUE Integer Integer.MAX_VALUE for (int i = 0 ; i <= x ; i++) {
            min = Math.min(min, a * i + c * 2 * (x - i) + b * (Math.max(0, y - (x - i))));
        } int i = 0 ; int i = 0 ; i 0 i <= x i x i++ i++ i {
            min = Math.min(min, a * i + c * 2 * (x - i) + b * (Math.max(0, y - (x - i))));
        } {
            min = Math.min(min, a * i + c * 2 * (x - i) + b * (Math.max(0, y - (x - i))));
        } min = Math.min(min, a * i + c * 2 * (x - i) + b * (Math.max(0, y - (x - i)))) min Math.min(min, a * i + c * 2 * (x - i) + b * (Math.max(0, y - (x - i)))) Math.min Math min a * i + c * 2 * (x - i) + b * (Math.max(0, y - (x - i))) a * i + c * 2 * (x - i) + b * (Math.max(0, y - (x - i))) a * i a i c * 2 * (x - i) c * 2 * (x - i) c 2 (x - i) x i b * (Math.max(0, y - (x - i))) b (Math.max(0, y - (x - i))) Math.max Math 0 y - (x - i) y (x - i) x i for (int i = 0 ; i <= y ; i++) {
            min = Math.min(min, b * i + c * 2 * (y - i) + a * (Math.max(0, x - (y - i))));
        } int i = 0 ; int i = 0 ; i 0 i <= y i y i++ i++ i {
            min = Math.min(min, b * i + c * 2 * (y - i) + a * (Math.max(0, x - (y - i))));
        } {
            min = Math.min(min, b * i + c * 2 * (y - i) + a * (Math.max(0, x - (y - i))));
        } min = Math.min(min, b * i + c * 2 * (y - i) + a * (Math.max(0, x - (y - i)))) min Math.min(min, b * i + c * 2 * (y - i) + a * (Math.max(0, x - (y - i)))) Math.min Math min b * i + c * 2 * (y - i) + a * (Math.max(0, x - (y - i))) b * i + c * 2 * (y - i) + a * (Math.max(0, x - (y - i))) b * i b i c * 2 * (y - i) c * 2 * (y - i) c 2 (y - i) y i a * (Math.max(0, x - (y - i))) a (Math.max(0, x - (y - i))) Math.max Math 0 x - (y - i) x (y - i) y i 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) {
        @SuppressWarnings("resource")
        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();
        int min = Integer.MAX_VALUE;
        for (int i = 0 ; i <= x ; i++) {
            min = Math.min(min, a * i + c * 2 * (x - i) + b * (Math.max(0, y - (x - i))));
        }
        for (int i = 0 ; i <= y ; i++) {
            min = Math.min(min, b * i + c * 2 * (y - i) + a * (Math.max(0, x - (y - i))));
        }
        System.out.println(min);
    }

} public class Main {

    public static void main(String[] args) {
        @SuppressWarnings("resource")
        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();
        int min = Integer.MAX_VALUE;
        for (int i = 0 ; i <= x ; i++) {
            min = Math.min(min, a * i + c * 2 * (x - i) + b * (Math.max(0, y - (x - i))));
        }
        for (int i = 0 ; i <= y ; i++) {
            min = Math.min(min, b * i + c * 2 * (y - i) + a * (Math.max(0, x - (y - i))));
        }
        System.out.println(min);
    }

} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        @SuppressWarnings("resource")
        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();
        int min = Integer.MAX_VALUE;
        for (int i = 0 ; i <= x ; i++) {
            min = Math.min(min, a * i + c * 2 * (x - i) + b * (Math.max(0, y - (x - i))));
        }
        for (int i = 0 ; i <= y ; i++) {
            min = Math.min(min, b * i + c * 2 * (y - i) + a * (Math.max(0, x - (y - i))));
        }
        System.out.println(min);
    }

}