import java.util.Scanner;
public class Main {

	public static void main(String[] args) {
		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();

		long min = Long.MAX_VALUE;

		for (int i = 0; i <= 100000; i++) {
			long amount = 0;
			amount = i * 2 * C + Math.max(0, X-i) * A + Math.max(0, Y-i) * B;
			min = Math.min(min, amount);
		}

		System.out.println(min);

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

	public static void main(String[] args) {
		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();

		long min = Long.MAX_VALUE;

		for (int i = 0; i <= 100000; i++) {
			long amount = 0;
			amount = i * 2 * C + Math.max(0, X-i) * A + Math.max(0, Y-i) * B;
			min = Math.min(min, amount);
		}

		System.out.println(min);

	}
} Main public static void main(String[] args) {
		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();

		long min = Long.MAX_VALUE;

		for (int i = 0; i <= 100000; i++) {
			long amount = 0;
			amount = i * 2 * C + Math.max(0, X-i) * A + Math.max(0, Y-i) * B;
			min = Math.min(min, amount);
		}

		System.out.println(min);

	} main {
		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();

		long min = Long.MAX_VALUE;

		for (int i = 0; i <= 100000; i++) {
			long amount = 0;
			amount = i * 2 * C + Math.max(0, X-i) * A + Math.max(0, Y-i) * B;
			min = Math.min(min, amount);
		}

		System.out.println(min);

	} 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 long min = Long.MAX_VALUE; min Long.MAX_VALUE Long Long.MAX_VALUE for (int i = 0; i <= 100000; i++) {
			long amount = 0;
			amount = i * 2 * C + Math.max(0, X-i) * A + Math.max(0, Y-i) * B;
			min = Math.min(min, amount);
		} int i = 0; int i = 0; i 0 i <= 100000 i 100000 i++ i++ i {
			long amount = 0;
			amount = i * 2 * C + Math.max(0, X-i) * A + Math.max(0, Y-i) * B;
			min = Math.min(min, amount);
		} {
			long amount = 0;
			amount = i * 2 * C + Math.max(0, X-i) * A + Math.max(0, Y-i) * B;
			min = Math.min(min, amount);
		} long amount = 0; amount 0 amount = i * 2 * C + Math.max(0, X-i) * A + Math.max(0, Y-i) * B amount i * 2 * C + Math.max(0, X-i) * A + Math.max(0, Y-i) * B i * 2 * C + Math.max(0, X-i) * A + Math.max(0, Y-i) * B i * 2 * C i * 2 * C i 2 C Math.max(0, X-i) * A Math.max(0, X-i) Math.max Math 0 X-i X i A Math.max(0, Y-i) * B Math.max(0, Y-i) Math.max Math 0 Y-i Y i B min = Math.min(min, amount) min Math.min(min, amount) Math.min Math min amount 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) {
		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();

		long min = Long.MAX_VALUE;

		for (int i = 0; i <= 100000; i++) {
			long amount = 0;
			amount = i * 2 * C + Math.max(0, X-i) * A + Math.max(0, Y-i) * B;
			min = Math.min(min, amount);
		}

		System.out.println(min);

	}
} public class Main {

	public static void main(String[] args) {
		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();

		long min = Long.MAX_VALUE;

		for (int i = 0; i <= 100000; i++) {
			long amount = 0;
			amount = i * 2 * C + Math.max(0, X-i) * A + Math.max(0, Y-i) * B;
			min = Math.min(min, amount);
		}

		System.out.println(min);

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

	public static void main(String[] args) {
		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();

		long min = Long.MAX_VALUE;

		for (int i = 0; i <= 100000; i++) {
			long amount = 0;
			amount = i * 2 * C + Math.max(0, X-i) * A + Math.max(0, Y-i) * B;
			min = Math.min(min, amount);
		}

		System.out.println(min);

	}
}
