import java.util.Scanner;
class Main{
	public static void main(String[]$){
		Scanner sc=new Scanner(System.in);
		int a=sc.nextInt(),b=sc.nextInt(),c=sc.nextInt(),x=sc.nextInt(),y=sc.nextInt();
		System.out.println(Math.min(a*x+b*y, Math.min(c*2*Math.max(x,y),c*2*Math.min(x,y)+(x>y?a*(x-y):b*(y-x) ))));
	}
} import java.util.Scanner; Scanner java.util class Main{
	public static void main(String[]$){
		Scanner sc=new Scanner(System.in);
		int a=sc.nextInt(),b=sc.nextInt(),c=sc.nextInt(),x=sc.nextInt(),y=sc.nextInt();
		System.out.println(Math.min(a*x+b*y, Math.min(c*2*Math.max(x,y),c*2*Math.min(x,y)+(x>y?a*(x-y):b*(y-x) ))));
	}
} Main public static void main(String[]$){
		Scanner sc=new Scanner(System.in);
		int a=sc.nextInt(),b=sc.nextInt(),c=sc.nextInt(),x=sc.nextInt(),y=sc.nextInt();
		System.out.println(Math.min(a*x+b*y, Math.min(c*2*Math.max(x,y),c*2*Math.min(x,y)+(x>y?a*(x-y):b*(y-x) ))));
	} main {
		Scanner sc=new Scanner(System.in);
		int a=sc.nextInt(),b=sc.nextInt(),c=sc.nextInt(),x=sc.nextInt(),y=sc.nextInt();
		System.out.println(Math.min(a*x+b*y, Math.min(c*2*Math.max(x,y),c*2*Math.min(x,y)+(x>y?a*(x-y):b*(y-x) ))));
	} Scanner sc=new Scanner(System.in); sc new Scanner(System.in) int a=sc.nextInt() a sc.nextInt() sc.nextInt sc b=sc.nextInt() b sc.nextInt() sc.nextInt sc c=sc.nextInt() c sc.nextInt() sc.nextInt sc x=sc.nextInt() x sc.nextInt() sc.nextInt sc y=sc.nextInt(); y sc.nextInt() sc.nextInt sc System.out.println(Math.min(a*x+b*y, Math.min(c*2*Math.max(x,y),c*2*Math.min(x,y)+(x>y?a*(x-y):b*(y-x) )))) System.out.println System.out System System.out Math.min(a*x+b*y, Math.min(c*2*Math.max(x,y),c*2*Math.min(x,y)+(x>y?a*(x-y):b*(y-x) ))) Math.min Math a*x+b*y a*x a x b*y b y Math.min(c*2*Math.max(x,y),c*2*Math.min(x,y)+(x>y?a*(x-y):b*(y-x) )) Math.min Math c*2*Math.max(x,y) c*2*Math.max(x,y) c 2 Math.max(x,y) Math.max Math x y c*2*Math.min(x,y)+(x>y?a*(x-y):b*(y-x) ) c*2*Math.min(x,y) c*2*Math.min(x,y) c 2 Math.min(x,y) Math.min Math x y (x>y?a*(x-y):b*(y-x) ) x>y x y a*(x-y) a (x-y) x y b*(y-x) b (y-x) y x String[]$ $
import java.util.Scanner;
class Main{
	public static void main(String[]$){
		Scanner sc=new Scanner(System.in);
		int a=sc.nextInt(),b=sc.nextInt(),c=sc.nextInt(),x=sc.nextInt(),y=sc.nextInt();
		System.out.println(Math.min(a*x+b*y, Math.min(c*2*Math.max(x,y),c*2*Math.min(x,y)+(x>y?a*(x-y):b*(y-x) ))));
	}
}