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 = 1000000000;
		for(int i = 0;i < Math.max(X,Y) + 1;i++){
			ans = Math.min(ans,2 * C * i + A * seisu(X - i) + B * seisu(Y - i));
		}
		System.out.println(ans);
	}
	public static int seisu(int a){
		if(a > 0){
			return a;
		}
		return 0;
	}
} 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 = 1000000000;
		for(int i = 0;i < Math.max(X,Y) + 1;i++){
			ans = Math.min(ans,2 * C * i + A * seisu(X - i) + B * seisu(Y - i));
		}
		System.out.println(ans);
	}
	public static int seisu(int a){
		if(a > 0){
			return a;
		}
		return 0;
	}
} 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 = 1000000000;
		for(int i = 0;i < Math.max(X,Y) + 1;i++){
			ans = Math.min(ans,2 * C * i + A * seisu(X - i) + B * seisu(Y - i));
		}
		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 = 1000000000;
		for(int i = 0;i < Math.max(X,Y) + 1;i++){
			ans = Math.min(ans,2 * C * i + A * seisu(X - i) + B * seisu(Y - i));
		}
		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 = 1000000000; ans 1000000000 for(int i = 0;i < Math.max(X,Y) + 1;i++){
			ans = Math.min(ans,2 * C * i + A * seisu(X - i) + B * seisu(Y - i));
		} int i = 0; int i = 0; i 0 i < Math.max(X,Y) + 1 i Math.max(X,Y) + 1 Math.max(X,Y) Math.max Math X Y 1 i++ i++ i {
			ans = Math.min(ans,2 * C * i + A * seisu(X - i) + B * seisu(Y - i));
		} {
			ans = Math.min(ans,2 * C * i + A * seisu(X - i) + B * seisu(Y - i));
		} ans = Math.min(ans,2 * C * i + A * seisu(X - i) + B * seisu(Y - i)) ans Math.min(ans,2 * C * i + A * seisu(X - i) + B * seisu(Y - i)) Math.min Math ans 2 * C * i + A * seisu(X - i) + B * seisu(Y - i) 2 * C * i + A * seisu(X - i) + B * seisu(Y - i) 2 * C * i 2 * C * i 2 C i A * seisu(X - i) A seisu(X - i) seisu X - i X i B * seisu(Y - i) B seisu(Y - i) seisu Y - i Y i System.out.println(ans) System.out.println System.out System System.out ans String args[] args public static int seisu(int a){
		if(a > 0){
			return a;
		}
		return 0;
	} seisu {
		if(a > 0){
			return a;
		}
		return 0;
	} if(a > 0){
			return a;
		} a > 0 a 0 {
			return a;
		} return a; a return 0; 0 int a a 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 = 1000000000;
		for(int i = 0;i < Math.max(X,Y) + 1;i++){
			ans = Math.min(ans,2 * C * i + A * seisu(X - i) + B * seisu(Y - i));
		}
		System.out.println(ans);
	}
	public static int seisu(int a){
		if(a > 0){
			return a;
		}
		return 0;
	}
} 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 = 1000000000;
		for(int i = 0;i < Math.max(X,Y) + 1;i++){
			ans = Math.min(ans,2 * C * i + A * seisu(X - i) + B * seisu(Y - i));
		}
		System.out.println(ans);
	}
	public static int seisu(int a){
		if(a > 0){
			return a;
		}
		return 0;
	}
} 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 = 1000000000;
		for(int i = 0;i < Math.max(X,Y) + 1;i++){
			ans = Math.min(ans,2 * C * i + A * seisu(X - i) + B * seisu(Y - i));
		}
		System.out.println(ans);
	}
	public static int seisu(int a){
		if(a > 0){
			return a;
		}
		return 0;
	}
}