import java.util.Scanner;

public class Main {
	static public void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt();
		int b = scan.nextInt();
		int c = scan.nextInt();
		int x = scan.nextInt();
		int y = scan.nextInt();
		scan.close();

		int ans = a * x + b * y;

		int tmp1 = 2 * c * x + b * Math.max(y - x, 0);
		if (ans > tmp1) {
			ans = tmp1;
		}

		int tmp2 = 2 * c * y + a * Math.max(x - y, 0);
		if (ans > tmp2) {
			ans = tmp2;
		}

		System.out.println(ans);
	}
} import java.util.Scanner; Scanner java.util public class Main {
	static public void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt();
		int b = scan.nextInt();
		int c = scan.nextInt();
		int x = scan.nextInt();
		int y = scan.nextInt();
		scan.close();

		int ans = a * x + b * y;

		int tmp1 = 2 * c * x + b * Math.max(y - x, 0);
		if (ans > tmp1) {
			ans = tmp1;
		}

		int tmp2 = 2 * c * y + a * Math.max(x - y, 0);
		if (ans > tmp2) {
			ans = tmp2;
		}

		System.out.println(ans);
	}
} Main static public void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt();
		int b = scan.nextInt();
		int c = scan.nextInt();
		int x = scan.nextInt();
		int y = scan.nextInt();
		scan.close();

		int ans = a * x + b * y;

		int tmp1 = 2 * c * x + b * Math.max(y - x, 0);
		if (ans > tmp1) {
			ans = tmp1;
		}

		int tmp2 = 2 * c * y + a * Math.max(x - y, 0);
		if (ans > tmp2) {
			ans = tmp2;
		}

		System.out.println(ans);
	} main {

		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt();
		int b = scan.nextInt();
		int c = scan.nextInt();
		int x = scan.nextInt();
		int y = scan.nextInt();
		scan.close();

		int ans = a * x + b * y;

		int tmp1 = 2 * c * x + b * Math.max(y - x, 0);
		if (ans > tmp1) {
			ans = tmp1;
		}

		int tmp2 = 2 * c * y + a * Math.max(x - y, 0);
		if (ans > tmp2) {
			ans = tmp2;
		}

		System.out.println(ans);
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int a = scan.nextInt(); a scan.nextInt() scan.nextInt scan int b = scan.nextInt(); b scan.nextInt() scan.nextInt scan int c = scan.nextInt(); c scan.nextInt() scan.nextInt scan int x = scan.nextInt(); x scan.nextInt() scan.nextInt scan int y = scan.nextInt(); y scan.nextInt() scan.nextInt scan scan.close() scan.close scan int ans = a * x + b * y; ans a * x + b * y a * x a x b * y b y int tmp1 = 2 * c * x + b * Math.max(y - x, 0); tmp1 2 * c * x + b * Math.max(y - x, 0) 2 * c * x 2 * c * x 2 c x b * Math.max(y - x, 0) b Math.max(y - x, 0) Math.max Math y - x y x 0 if (ans > tmp1) {
			ans = tmp1;
		} ans > tmp1 ans tmp1 {
			ans = tmp1;
		} ans = tmp1 ans tmp1 int tmp2 = 2 * c * y + a * Math.max(x - y, 0); tmp2 2 * c * y + a * Math.max(x - y, 0) 2 * c * y 2 * c * y 2 c y a * Math.max(x - y, 0) a Math.max(x - y, 0) Math.max Math x - y x y 0 if (ans > tmp2) {
			ans = tmp2;
		} ans > tmp2 ans tmp2 {
			ans = tmp2;
		} ans = tmp2 ans tmp2 System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
	static public void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt();
		int b = scan.nextInt();
		int c = scan.nextInt();
		int x = scan.nextInt();
		int y = scan.nextInt();
		scan.close();

		int ans = a * x + b * y;

		int tmp1 = 2 * c * x + b * Math.max(y - x, 0);
		if (ans > tmp1) {
			ans = tmp1;
		}

		int tmp2 = 2 * c * y + a * Math.max(x - y, 0);
		if (ans > tmp2) {
			ans = tmp2;
		}

		System.out.println(ans);
	}
} public class Main {
	static public void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt();
		int b = scan.nextInt();
		int c = scan.nextInt();
		int x = scan.nextInt();
		int y = scan.nextInt();
		scan.close();

		int ans = a * x + b * y;

		int tmp1 = 2 * c * x + b * Math.max(y - x, 0);
		if (ans > tmp1) {
			ans = tmp1;
		}

		int tmp2 = 2 * c * y + a * Math.max(x - y, 0);
		if (ans > tmp2) {
			ans = tmp2;
		}

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

public class Main {
	static public void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt();
		int b = scan.nextInt();
		int c = scan.nextInt();
		int x = scan.nextInt();
		int y = scan.nextInt();
		scan.close();

		int ans = a * x + b * y;

		int tmp1 = 2 * c * x + b * Math.max(y - x, 0);
		if (ans > tmp1) {
			ans = tmp1;
		}

		int tmp2 = 2 * c * y + a * Math.max(x - y, 0);
		if (ans > tmp2) {
			ans = tmp2;
		}

		System.out.println(ans);
	}
}
