import java.util.Scanner;

public class Main{
	public static void main(String[] arg) {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		int C = sc.nextInt()*2;
		int X = sc.nextInt();
		int Y = sc.nextInt();
		int ans1 = C*Math.max(X,Y);
		int ans2 = C*Math.min(X,Y);
		if(X<Y) {
			ans2 += Math.abs(Y-X)*B;
		} else {
			ans2 += Math.abs(Y-X)*A;
		}
		int ans3= A*X+B*Y;
		System.out.println(Math.min(ans1,Math.min(ans2, ans3)));
	}
} import java.util.Scanner; Scanner java.util public class Main{
	public static void main(String[] arg) {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		int C = sc.nextInt()*2;
		int X = sc.nextInt();
		int Y = sc.nextInt();
		int ans1 = C*Math.max(X,Y);
		int ans2 = C*Math.min(X,Y);
		if(X<Y) {
			ans2 += Math.abs(Y-X)*B;
		} else {
			ans2 += Math.abs(Y-X)*A;
		}
		int ans3= A*X+B*Y;
		System.out.println(Math.min(ans1,Math.min(ans2, ans3)));
	}
} Main public static void main(String[] arg) {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		int C = sc.nextInt()*2;
		int X = sc.nextInt();
		int Y = sc.nextInt();
		int ans1 = C*Math.max(X,Y);
		int ans2 = C*Math.min(X,Y);
		if(X<Y) {
			ans2 += Math.abs(Y-X)*B;
		} else {
			ans2 += Math.abs(Y-X)*A;
		}
		int ans3= A*X+B*Y;
		System.out.println(Math.min(ans1,Math.min(ans2, ans3)));
	} main {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		int C = sc.nextInt()*2;
		int X = sc.nextInt();
		int Y = sc.nextInt();
		int ans1 = C*Math.max(X,Y);
		int ans2 = C*Math.min(X,Y);
		if(X<Y) {
			ans2 += Math.abs(Y-X)*B;
		} else {
			ans2 += Math.abs(Y-X)*A;
		}
		int ans3= A*X+B*Y;
		System.out.println(Math.min(ans1,Math.min(ans2, ans3)));
	} 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()*2; C sc.nextInt()*2 sc.nextInt() sc.nextInt sc 2 int X = sc.nextInt(); X sc.nextInt() sc.nextInt sc int Y = sc.nextInt(); Y sc.nextInt() sc.nextInt sc int ans1 = C*Math.max(X,Y); ans1 C*Math.max(X,Y) C Math.max(X,Y) Math.max Math X Y int ans2 = C*Math.min(X,Y); ans2 C*Math.min(X,Y) C Math.min(X,Y) Math.min Math X Y if(X<Y) {
			ans2 += Math.abs(Y-X)*B;
		} else {
			ans2 += Math.abs(Y-X)*A;
		} X<Y X Y {
			ans2 += Math.abs(Y-X)*B;
		} ans2 += Math.abs(Y-X)*B ans2 Math.abs(Y-X)*B Math.abs(Y-X) Math.abs Math Y-X Y X B {
			ans2 += Math.abs(Y-X)*A;
		} ans2 += Math.abs(Y-X)*A ans2 Math.abs(Y-X)*A Math.abs(Y-X) Math.abs Math Y-X Y X A int ans3= A*X+B*Y; ans3 A*X+B*Y A*X A X B*Y B Y System.out.println(Math.min(ans1,Math.min(ans2, ans3))) System.out.println System.out System System.out Math.min(ans1,Math.min(ans2, ans3)) Math.min Math ans1 Math.min(ans2, ans3) Math.min Math ans2 ans3 String[] arg arg public class Main{
	public static void main(String[] arg) {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		int C = sc.nextInt()*2;
		int X = sc.nextInt();
		int Y = sc.nextInt();
		int ans1 = C*Math.max(X,Y);
		int ans2 = C*Math.min(X,Y);
		if(X<Y) {
			ans2 += Math.abs(Y-X)*B;
		} else {
			ans2 += Math.abs(Y-X)*A;
		}
		int ans3= A*X+B*Y;
		System.out.println(Math.min(ans1,Math.min(ans2, ans3)));
	}
} public class Main{
	public static void main(String[] arg) {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		int C = sc.nextInt()*2;
		int X = sc.nextInt();
		int Y = sc.nextInt();
		int ans1 = C*Math.max(X,Y);
		int ans2 = C*Math.min(X,Y);
		if(X<Y) {
			ans2 += Math.abs(Y-X)*B;
		} else {
			ans2 += Math.abs(Y-X)*A;
		}
		int ans3= A*X+B*Y;
		System.out.println(Math.min(ans1,Math.min(ans2, ans3)));
	}
} Main
import java.util.Scanner;

public class Main{
	public static void main(String[] arg) {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		int C = sc.nextInt()*2;
		int X = sc.nextInt();
		int Y = sc.nextInt();
		int ans1 = C*Math.max(X,Y);
		int ans2 = C*Math.min(X,Y);
		if(X<Y) {
			ans2 += Math.abs(Y-X)*B;
		} else {
			ans2 += Math.abs(Y-X)*A;
		}
		int ans3= A*X+B*Y;
		System.out.println(Math.min(ans1,Math.min(ans2, ans3)));
	}
}