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

	}

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

	}

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

	}

}