import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws Exception {
		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();
		sc.close();

		int ans = Integer.MAX_VALUE;
		int end = Math.max(x, y) * 2;
		for (int i = 0; i <= end; i++) {
			int val = c * i * 2 + a * Math.max((x - i), 0) + b * Math.max((y - i), 0);
			ans = Math.min(ans, val);
		}
		System.out.println(ans);
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) throws Exception {
		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();
		sc.close();

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

		int ans = Integer.MAX_VALUE;
		int end = Math.max(x, y) * 2;
		for (int i = 0; i <= end; i++) {
			int val = c * i * 2 + a * Math.max((x - i), 0) + b * Math.max((y - i), 0);
			ans = Math.min(ans, val);
		}
		System.out.println(ans);
	} 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();
		sc.close();

		int ans = Integer.MAX_VALUE;
		int end = Math.max(x, y) * 2;
		for (int i = 0; i <= end; i++) {
			int val = c * i * 2 + a * Math.max((x - i), 0) + b * Math.max((y - i), 0);
			ans = Math.min(ans, val);
		}
		System.out.println(ans);
	} 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 sc.close() sc.close sc int ans = Integer.MAX_VALUE; ans Integer.MAX_VALUE Integer Integer.MAX_VALUE int end = Math.max(x, y) * 2; end Math.max(x, y) * 2 Math.max(x, y) Math.max Math x y 2 for (int i = 0; i <= end; i++) {
			int val = c * i * 2 + a * Math.max((x - i), 0) + b * Math.max((y - i), 0);
			ans = Math.min(ans, val);
		} int i = 0; int i = 0; i 0 i <= end i end i++ i++ i {
			int val = c * i * 2 + a * Math.max((x - i), 0) + b * Math.max((y - i), 0);
			ans = Math.min(ans, val);
		} {
			int val = c * i * 2 + a * Math.max((x - i), 0) + b * Math.max((y - i), 0);
			ans = Math.min(ans, val);
		} int val = c * i * 2 + a * Math.max((x - i), 0) + b * Math.max((y - i), 0); val c * i * 2 + a * Math.max((x - i), 0) + b * Math.max((y - i), 0) c * i * 2 + a * Math.max((x - i), 0) + b * Math.max((y - i), 0) c * i * 2 c * i * 2 c i 2 a * Math.max((x - i), 0) a Math.max((x - i), 0) Math.max Math (x - i) x i 0 b * Math.max((y - i), 0) b Math.max((y - i), 0) Math.max Math (y - i) y i 0 ans = Math.min(ans, val) ans Math.min(ans, val) Math.min Math ans val 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) throws Exception {
		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();
		sc.close();

		int ans = Integer.MAX_VALUE;
		int end = Math.max(x, y) * 2;
		for (int i = 0; i <= end; i++) {
			int val = c * i * 2 + a * Math.max((x - i), 0) + b * Math.max((y - i), 0);
			ans = Math.min(ans, val);
		}
		System.out.println(ans);
	}
} public class Main {
	public static void main(String[] args) throws Exception {
		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();
		sc.close();

		int ans = Integer.MAX_VALUE;
		int end = Math.max(x, y) * 2;
		for (int i = 0; i <= end; i++) {
			int val = c * i * 2 + a * Math.max((x - i), 0) + b * Math.max((y - i), 0);
			ans = Math.min(ans, val);
		}
		System.out.println(ans);
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws Exception {
		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();
		sc.close();

		int ans = Integer.MAX_VALUE;
		int end = Math.max(x, y) * 2;
		for (int i = 0; i <= end; i++) {
			int val = c * i * 2 + a * Math.max((x - i), 0) + b * Math.max((y - i), 0);
			ans = Math.min(ans, val);
		}
		System.out.println(ans);
	}
}
