import java.util.*;

class Main {

	static Scanner sc = new Scanner(System.in);

	public static void main(String[] args) {
		int A = sc.nextInt(), B = sc.nextInt(), C = sc.nextInt(), X = sc.nextInt(), Y = sc.nextInt(),
				sum = 2 * C * (Math.max(X, Y));
		if (X < Y) {
			sum = Math.min(2 * C * X + B * (Y - X), 2 * C * Y);
		} else {
			sum = Math.min(2 * C * Y + A * (X - Y), 2 * C * X);
		}
		System.out.println(A * X + B * Y > sum ? sum : A * X + B * Y);
	}
} import java.util.*; util.* java class Main {

	static Scanner sc = new Scanner(System.in);

	public static void main(String[] args) {
		int A = sc.nextInt(), B = sc.nextInt(), C = sc.nextInt(), X = sc.nextInt(), Y = sc.nextInt(),
				sum = 2 * C * (Math.max(X, Y));
		if (X < Y) {
			sum = Math.min(2 * C * X + B * (Y - X), 2 * C * Y);
		} else {
			sum = Math.min(2 * C * Y + A * (X - Y), 2 * C * X);
		}
		System.out.println(A * X + B * Y > sum ? sum : A * X + B * Y);
	}
} Main static Scanner sc = new Scanner(System.in); sc new Scanner(System.in) public static void main(String[] args) {
		int A = sc.nextInt(), B = sc.nextInt(), C = sc.nextInt(), X = sc.nextInt(), Y = sc.nextInt(),
				sum = 2 * C * (Math.max(X, Y));
		if (X < Y) {
			sum = Math.min(2 * C * X + B * (Y - X), 2 * C * Y);
		} else {
			sum = Math.min(2 * C * Y + A * (X - Y), 2 * C * X);
		}
		System.out.println(A * X + B * Y > sum ? sum : A * X + B * Y);
	} main {
		int A = sc.nextInt(), B = sc.nextInt(), C = sc.nextInt(), X = sc.nextInt(), Y = sc.nextInt(),
				sum = 2 * C * (Math.max(X, Y));
		if (X < Y) {
			sum = Math.min(2 * C * X + B * (Y - X), 2 * C * Y);
		} else {
			sum = Math.min(2 * C * Y + A * (X - Y), 2 * C * X);
		}
		System.out.println(A * X + B * Y > sum ? sum : A * X + B * Y);
	} int A = sc.nextInt() A sc.nextInt() sc.nextInt sc B = sc.nextInt() B sc.nextInt() sc.nextInt sc C = sc.nextInt() C sc.nextInt() sc.nextInt sc X = sc.nextInt() X sc.nextInt() sc.nextInt sc Y = sc.nextInt() Y sc.nextInt() sc.nextInt sc sum = 2 * C * (Math.max(X, Y)); sum 2 * C * (Math.max(X, Y)) 2 * C * (Math.max(X, Y)) 2 C (Math.max(X, Y)) Math.max Math X Y if (X < Y) {
			sum = Math.min(2 * C * X + B * (Y - X), 2 * C * Y);
		} else {
			sum = Math.min(2 * C * Y + A * (X - Y), 2 * C * X);
		} X < Y X Y {
			sum = Math.min(2 * C * X + B * (Y - X), 2 * C * Y);
		} sum = Math.min(2 * C * X + B * (Y - X), 2 * C * Y) sum Math.min(2 * C * X + B * (Y - X), 2 * C * Y) Math.min Math 2 * C * X + B * (Y - X) 2 * C * X 2 * C * X 2 C X B * (Y - X) B (Y - X) Y X 2 * C * Y 2 * C * Y 2 C Y {
			sum = Math.min(2 * C * Y + A * (X - Y), 2 * C * X);
		} sum = Math.min(2 * C * Y + A * (X - Y), 2 * C * X) sum Math.min(2 * C * Y + A * (X - Y), 2 * C * X) Math.min Math 2 * C * Y + A * (X - Y) 2 * C * Y 2 * C * Y 2 C Y A * (X - Y) A (X - Y) X Y 2 * C * X 2 * C * X 2 C X System.out.println(A * X + B * Y > sum ? sum : A * X + B * Y) System.out.println System.out System System.out A * X + B * Y > sum ? sum : A * X + B * Y A * X + B * Y > sum A * X + B * Y A * X A X B * Y B Y sum sum A * X + B * Y A * X A X B * Y B Y String[] args args
import java.util.*;

class Main {

	static Scanner sc = new Scanner(System.in);

	public static void main(String[] args) {
		int A = sc.nextInt(), B = sc.nextInt(), C = sc.nextInt(), X = sc.nextInt(), Y = sc.nextInt(),
				sum = 2 * C * (Math.max(X, Y));
		if (X < Y) {
			sum = Math.min(2 * C * X + B * (Y - X), 2 * C * Y);
		} else {
			sum = Math.min(2 * C * Y + A * (X - Y), 2 * C * X);
		}
		System.out.println(A * X + B * Y > sum ? sum : A * X + B * Y);
	}
}