import java.util.Scanner;
public class Main {
	public static void main(String[] args){
		Scanner stdIn=new Scanner(System.in);
		int A=stdIn.nextInt();
		int B=stdIn.nextInt();
		int C=stdIn.nextInt();
		int X=stdIn.nextInt();
		int Y=stdIn.nextInt();
		int z=0,ans=0;
		if(Y>X){
			z=X;X=Y;Y=z;
			z=A;A=B;B=z;
		}
		if(A+B>C*2){
			ans+=Y*C*2;
			X-=Y;
			if(A>C*2)
				ans+=X*C*2;
			else
				ans+=X*A;
		}
		else{
			ans+=(Y*B)+(Y*A);
			X-=Y;
			if(A>C*2)
				ans+=X*C*2;
			else
				ans+=X*A;
		}
		System.out.println(ans);
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args){
		Scanner stdIn=new Scanner(System.in);
		int A=stdIn.nextInt();
		int B=stdIn.nextInt();
		int C=stdIn.nextInt();
		int X=stdIn.nextInt();
		int Y=stdIn.nextInt();
		int z=0,ans=0;
		if(Y>X){
			z=X;X=Y;Y=z;
			z=A;A=B;B=z;
		}
		if(A+B>C*2){
			ans+=Y*C*2;
			X-=Y;
			if(A>C*2)
				ans+=X*C*2;
			else
				ans+=X*A;
		}
		else{
			ans+=(Y*B)+(Y*A);
			X-=Y;
			if(A>C*2)
				ans+=X*C*2;
			else
				ans+=X*A;
		}
		System.out.println(ans);
	}
} Main public static void main(String[] args){
		Scanner stdIn=new Scanner(System.in);
		int A=stdIn.nextInt();
		int B=stdIn.nextInt();
		int C=stdIn.nextInt();
		int X=stdIn.nextInt();
		int Y=stdIn.nextInt();
		int z=0,ans=0;
		if(Y>X){
			z=X;X=Y;Y=z;
			z=A;A=B;B=z;
		}
		if(A+B>C*2){
			ans+=Y*C*2;
			X-=Y;
			if(A>C*2)
				ans+=X*C*2;
			else
				ans+=X*A;
		}
		else{
			ans+=(Y*B)+(Y*A);
			X-=Y;
			if(A>C*2)
				ans+=X*C*2;
			else
				ans+=X*A;
		}
		System.out.println(ans);
	} main {
		Scanner stdIn=new Scanner(System.in);
		int A=stdIn.nextInt();
		int B=stdIn.nextInt();
		int C=stdIn.nextInt();
		int X=stdIn.nextInt();
		int Y=stdIn.nextInt();
		int z=0,ans=0;
		if(Y>X){
			z=X;X=Y;Y=z;
			z=A;A=B;B=z;
		}
		if(A+B>C*2){
			ans+=Y*C*2;
			X-=Y;
			if(A>C*2)
				ans+=X*C*2;
			else
				ans+=X*A;
		}
		else{
			ans+=(Y*B)+(Y*A);
			X-=Y;
			if(A>C*2)
				ans+=X*C*2;
			else
				ans+=X*A;
		}
		System.out.println(ans);
	} Scanner stdIn=new Scanner(System.in); stdIn new Scanner(System.in) int A=stdIn.nextInt(); A stdIn.nextInt() stdIn.nextInt stdIn int B=stdIn.nextInt(); B stdIn.nextInt() stdIn.nextInt stdIn int C=stdIn.nextInt(); C stdIn.nextInt() stdIn.nextInt stdIn int X=stdIn.nextInt(); X stdIn.nextInt() stdIn.nextInt stdIn int Y=stdIn.nextInt(); Y stdIn.nextInt() stdIn.nextInt stdIn int z=0 z 0 ans=0; ans 0 if(Y>X){
			z=X;X=Y;Y=z;
			z=A;A=B;B=z;
		} Y>X Y X {
			z=X;X=Y;Y=z;
			z=A;A=B;B=z;
		} z=X z X X=Y X Y Y=z Y z z=A z A A=B A B B=z B z if(A+B>C*2){
			ans+=Y*C*2;
			X-=Y;
			if(A>C*2)
				ans+=X*C*2;
			else
				ans+=X*A;
		}
		else{
			ans+=(Y*B)+(Y*A);
			X-=Y;
			if(A>C*2)
				ans+=X*C*2;
			else
				ans+=X*A;
		} A+B>C*2 A+B A B C*2 C 2 {
			ans+=Y*C*2;
			X-=Y;
			if(A>C*2)
				ans+=X*C*2;
			else
				ans+=X*A;
		} ans+=Y*C*2 ans Y*C*2 Y*C*2 Y C 2 X-=Y X Y if(A>C*2)
				ans+=X*C*2;
			else
				ans+=X*A; A>C*2 A C*2 C 2 ans+=X*C*2 ans X*C*2 X*C*2 X C 2 ans+=X*A ans X*A X A {
			ans+=(Y*B)+(Y*A);
			X-=Y;
			if(A>C*2)
				ans+=X*C*2;
			else
				ans+=X*A;
		} ans+=(Y*B)+(Y*A) ans (Y*B)+(Y*A) (Y*B) Y B (Y*A) Y A X-=Y X Y if(A>C*2)
				ans+=X*C*2;
			else
				ans+=X*A; A>C*2 A C*2 C 2 ans+=X*C*2 ans X*C*2 X*C*2 X C 2 ans+=X*A ans X*A X A 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 stdIn=new Scanner(System.in);
		int A=stdIn.nextInt();
		int B=stdIn.nextInt();
		int C=stdIn.nextInt();
		int X=stdIn.nextInt();
		int Y=stdIn.nextInt();
		int z=0,ans=0;
		if(Y>X){
			z=X;X=Y;Y=z;
			z=A;A=B;B=z;
		}
		if(A+B>C*2){
			ans+=Y*C*2;
			X-=Y;
			if(A>C*2)
				ans+=X*C*2;
			else
				ans+=X*A;
		}
		else{
			ans+=(Y*B)+(Y*A);
			X-=Y;
			if(A>C*2)
				ans+=X*C*2;
			else
				ans+=X*A;
		}
		System.out.println(ans);
	}
} public class Main {
	public static void main(String[] args){
		Scanner stdIn=new Scanner(System.in);
		int A=stdIn.nextInt();
		int B=stdIn.nextInt();
		int C=stdIn.nextInt();
		int X=stdIn.nextInt();
		int Y=stdIn.nextInt();
		int z=0,ans=0;
		if(Y>X){
			z=X;X=Y;Y=z;
			z=A;A=B;B=z;
		}
		if(A+B>C*2){
			ans+=Y*C*2;
			X-=Y;
			if(A>C*2)
				ans+=X*C*2;
			else
				ans+=X*A;
		}
		else{
			ans+=(Y*B)+(Y*A);
			X-=Y;
			if(A>C*2)
				ans+=X*C*2;
			else
				ans+=X*A;
		}
		System.out.println(ans);
	}
} Main
import java.util.Scanner;
public class Main {
	public static void main(String[] args){
		Scanner stdIn=new Scanner(System.in);
		int A=stdIn.nextInt();
		int B=stdIn.nextInt();
		int C=stdIn.nextInt();
		int X=stdIn.nextInt();
		int Y=stdIn.nextInt();
		int z=0,ans=0;
		if(Y>X){
			z=X;X=Y;Y=z;
			z=A;A=B;B=z;
		}
		if(A+B>C*2){
			ans+=Y*C*2;
			X-=Y;
			if(A>C*2)
				ans+=X*C*2;
			else
				ans+=X*A;
		}
		else{
			ans+=(Y*B)+(Y*A);
			X-=Y;
			if(A>C*2)
				ans+=X*C*2;
			else
				ans+=X*A;
		}
		System.out.println(ans);
	}
}