import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int A = in.nextInt();
		int B = in.nextInt();
		int C = in.nextInt();
		int X = in.nextInt();
		int Y = in.nextInt();
		int ans=A*X+B*Y;
		int N=X+Y;
		for(int i=0;i<100001;i++){
			ans=Math.min(ans,2*C*i+A*Math.max(0,X-i)+B*Math.max(0,Y-i));
		}
		System.out.println(ans);
	}

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

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int A = in.nextInt();
		int B = in.nextInt();
		int C = in.nextInt();
		int X = in.nextInt();
		int Y = in.nextInt();
		int ans=A*X+B*Y;
		int N=X+Y;
		for(int i=0;i<100001;i++){
			ans=Math.min(ans,2*C*i+A*Math.max(0,X-i)+B*Math.max(0,Y-i));
		}
		System.out.println(ans);
	}

} Main public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int A = in.nextInt();
		int B = in.nextInt();
		int C = in.nextInt();
		int X = in.nextInt();
		int Y = in.nextInt();
		int ans=A*X+B*Y;
		int N=X+Y;
		for(int i=0;i<100001;i++){
			ans=Math.min(ans,2*C*i+A*Math.max(0,X-i)+B*Math.max(0,Y-i));
		}
		System.out.println(ans);
	} main {
		Scanner in = new Scanner(System.in);
		int A = in.nextInt();
		int B = in.nextInt();
		int C = in.nextInt();
		int X = in.nextInt();
		int Y = in.nextInt();
		int ans=A*X+B*Y;
		int N=X+Y;
		for(int i=0;i<100001;i++){
			ans=Math.min(ans,2*C*i+A*Math.max(0,X-i)+B*Math.max(0,Y-i));
		}
		System.out.println(ans);
	} Scanner in = new Scanner(System.in); in new Scanner(System.in) int A = in.nextInt(); A in.nextInt() in.nextInt in int B = in.nextInt(); B in.nextInt() in.nextInt in int C = in.nextInt(); C in.nextInt() in.nextInt in int X = in.nextInt(); X in.nextInt() in.nextInt in int Y = in.nextInt(); Y in.nextInt() in.nextInt in int ans=A*X+B*Y; ans A*X+B*Y A*X A X B*Y B Y int N=X+Y; N X+Y X Y for(int i=0;i<100001;i++){
			ans=Math.min(ans,2*C*i+A*Math.max(0,X-i)+B*Math.max(0,Y-i));
		} int i=0; int i=0; i 0 i<100001 i 100001 i++ i++ i {
			ans=Math.min(ans,2*C*i+A*Math.max(0,X-i)+B*Math.max(0,Y-i));
		} {
			ans=Math.min(ans,2*C*i+A*Math.max(0,X-i)+B*Math.max(0,Y-i));
		} ans=Math.min(ans,2*C*i+A*Math.max(0,X-i)+B*Math.max(0,Y-i)) ans Math.min(ans,2*C*i+A*Math.max(0,X-i)+B*Math.max(0,Y-i)) Math.min Math ans 2*C*i+A*Math.max(0,X-i)+B*Math.max(0,Y-i) 2*C*i+A*Math.max(0,X-i)+B*Math.max(0,Y-i) 2*C*i 2*C*i 2 C i A*Math.max(0,X-i) A Math.max(0,X-i) Math.max Math 0 X-i X i B*Math.max(0,Y-i) B Math.max(0,Y-i) Math.max Math 0 Y-i Y i 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 in = new Scanner(System.in);
		int A = in.nextInt();
		int B = in.nextInt();
		int C = in.nextInt();
		int X = in.nextInt();
		int Y = in.nextInt();
		int ans=A*X+B*Y;
		int N=X+Y;
		for(int i=0;i<100001;i++){
			ans=Math.min(ans,2*C*i+A*Math.max(0,X-i)+B*Math.max(0,Y-i));
		}
		System.out.println(ans);
	}

} public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int A = in.nextInt();
		int B = in.nextInt();
		int C = in.nextInt();
		int X = in.nextInt();
		int Y = in.nextInt();
		int ans=A*X+B*Y;
		int N=X+Y;
		for(int i=0;i<100001;i++){
			ans=Math.min(ans,2*C*i+A*Math.max(0,X-i)+B*Math.max(0,Y-i));
		}
		System.out.println(ans);
	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int A = in.nextInt();
		int B = in.nextInt();
		int C = in.nextInt();
		int X = in.nextInt();
		int Y = in.nextInt();
		int ans=A*X+B*Y;
		int N=X+Y;
		for(int i=0;i<100001;i++){
			ans=Math.min(ans,2*C*i+A*Math.max(0,X-i)+B*Math.max(0,Y-i));
		}
		System.out.println(ans);
	}

}