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();

		if(A+B < 2*C) {
			System.out.println((A*X)+(B*Y));
		}else {
			int ans = 0;

			ans += Math.min(X, Y) * (2*C);

			int price = 0;
			if(X>Y) price = A;
			else price = B;

			ans += Math.min(price, 2*C) * Math.abs(X-Y);
			System.out.println(ans);
		}
	}

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

		if(A+B < 2*C) {
			System.out.println((A*X)+(B*Y));
		}else {
			int ans = 0;

			ans += Math.min(X, Y) * (2*C);

			int price = 0;
			if(X>Y) price = A;
			else price = B;

			ans += Math.min(price, 2*C) * Math.abs(X-Y);
			System.out.println(ans);
		}
	}

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

		if(A+B < 2*C) {
			System.out.println((A*X)+(B*Y));
		}else {
			int ans = 0;

			ans += Math.min(X, Y) * (2*C);

			int price = 0;
			if(X>Y) price = A;
			else price = B;

			ans += Math.min(price, 2*C) * Math.abs(X-Y);
			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();

		if(A+B < 2*C) {
			System.out.println((A*X)+(B*Y));
		}else {
			int ans = 0;

			ans += Math.min(X, Y) * (2*C);

			int price = 0;
			if(X>Y) price = A;
			else price = B;

			ans += Math.min(price, 2*C) * Math.abs(X-Y);
			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 if(A+B < 2*C) {
			System.out.println((A*X)+(B*Y));
		}else {
			int ans = 0;

			ans += Math.min(X, Y) * (2*C);

			int price = 0;
			if(X>Y) price = A;
			else price = B;

			ans += Math.min(price, 2*C) * Math.abs(X-Y);
			System.out.println(ans);
		} A+B < 2*C A+B A B 2*C 2 C {
			System.out.println((A*X)+(B*Y));
		} System.out.println((A*X)+(B*Y)) System.out.println System.out System System.out (A*X)+(B*Y) (A*X) A X (B*Y) B Y {
			int ans = 0;

			ans += Math.min(X, Y) * (2*C);

			int price = 0;
			if(X>Y) price = A;
			else price = B;

			ans += Math.min(price, 2*C) * Math.abs(X-Y);
			System.out.println(ans);
		} int ans = 0; ans 0 ans += Math.min(X, Y) * (2*C) ans Math.min(X, Y) * (2*C) Math.min(X, Y) Math.min Math X Y (2*C) 2 C int price = 0; price 0 if(X>Y) price = A;
			else price = B; X>Y X Y price = A price A price = B price B ans += Math.min(price, 2*C) * Math.abs(X-Y) ans Math.min(price, 2*C) * Math.abs(X-Y) Math.min(price, 2*C) Math.min Math price 2*C 2 C Math.abs(X-Y) Math.abs Math X-Y X Y 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[]) {

		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();

		if(A+B < 2*C) {
			System.out.println((A*X)+(B*Y));
		}else {
			int ans = 0;

			ans += Math.min(X, Y) * (2*C);

			int price = 0;
			if(X>Y) price = A;
			else price = B;

			ans += Math.min(price, 2*C) * Math.abs(X-Y);
			System.out.println(ans);
		}
	}

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

		if(A+B < 2*C) {
			System.out.println((A*X)+(B*Y));
		}else {
			int ans = 0;

			ans += Math.min(X, Y) * (2*C);

			int price = 0;
			if(X>Y) price = A;
			else price = B;

			ans += Math.min(price, 2*C) * Math.abs(X-Y);
			System.out.println(ans);
		}
	}

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

		if(A+B < 2*C) {
			System.out.println((A*X)+(B*Y));
		}else {
			int ans = 0;

			ans += Math.min(X, Y) * (2*C);

			int price = 0;
			if(X>Y) price = A;
			else price = B;

			ans += Math.min(price, 2*C) * Math.abs(X-Y);
			System.out.println(ans);
		}
	}

}