import java.util.Scanner;

public class Main {
	  
	public static void main(String args[]) {
		    Scanner scanner = new Scanner(System.in);
		   
			int a = scanner.nextInt();
			int b = scanner.nextInt();
			int c = scanner.nextInt();
			int x = scanner.nextInt();
			int y = scanner.nextInt();
			
			if( a + b <= 2 * c ) 
			{
				System.out.println(a * x + b * y);
			}
			else  // 2c < a + b 
			{
				if( x == y ) 
				{
					System.out.println(c * x * 2);
				}
				else if( x < y ) 
				{
					if(b < 2 * c) 
					{
						System.out.println(c * 2 * x + b * (y-x));
					}
					else 
					{
						System.out.println(c * 2 * y);
					}
				}
				else
				{
					if(a < 2 * c) 
					{
						System.out.println(c * 2 * y + a * (x-y));
					}
					else 
					{
						System.out.println(c * 2 * x);
					}
				}
			}
		    scanner.close(); }
		  } import java.util.Scanner; Scanner java.util public class Main {
	  
	public static void main(String args[]) {
		    Scanner scanner = new Scanner(System.in);
		   
			int a = scanner.nextInt();
			int b = scanner.nextInt();
			int c = scanner.nextInt();
			int x = scanner.nextInt();
			int y = scanner.nextInt();
			
			if( a + b <= 2 * c ) 
			{
				System.out.println(a * x + b * y);
			}
			else  // 2c < a + b 
			{
				if( x == y ) 
				{
					System.out.println(c * x * 2);
				}
				else if( x < y ) 
				{
					if(b < 2 * c) 
					{
						System.out.println(c * 2 * x + b * (y-x));
					}
					else 
					{
						System.out.println(c * 2 * y);
					}
				}
				else
				{
					if(a < 2 * c) 
					{
						System.out.println(c * 2 * y + a * (x-y));
					}
					else 
					{
						System.out.println(c * 2 * x);
					}
				}
			}
		    scanner.close(); }
		  } Main public static void main(String args[]) {
		    Scanner scanner = new Scanner(System.in);
		   
			int a = scanner.nextInt();
			int b = scanner.nextInt();
			int c = scanner.nextInt();
			int x = scanner.nextInt();
			int y = scanner.nextInt();
			
			if( a + b <= 2 * c ) 
			{
				System.out.println(a * x + b * y);
			}
			else  // 2c < a + b 
			{
				if( x == y ) 
				{
					System.out.println(c * x * 2);
				}
				else if( x < y ) 
				{
					if(b < 2 * c) 
					{
						System.out.println(c * 2 * x + b * (y-x));
					}
					else 
					{
						System.out.println(c * 2 * y);
					}
				}
				else
				{
					if(a < 2 * c) 
					{
						System.out.println(c * 2 * y + a * (x-y));
					}
					else 
					{
						System.out.println(c * 2 * x);
					}
				}
			}
		    scanner.close(); } main {
		    Scanner scanner = new Scanner(System.in);
		   
			int a = scanner.nextInt();
			int b = scanner.nextInt();
			int c = scanner.nextInt();
			int x = scanner.nextInt();
			int y = scanner.nextInt();
			
			if( a + b <= 2 * c ) 
			{
				System.out.println(a * x + b * y);
			}
			else  // 2c < a + b 
			{
				if( x == y ) 
				{
					System.out.println(c * x * 2);
				}
				else if( x < y ) 
				{
					if(b < 2 * c) 
					{
						System.out.println(c * 2 * x + b * (y-x));
					}
					else 
					{
						System.out.println(c * 2 * y);
					}
				}
				else
				{
					if(a < 2 * c) 
					{
						System.out.println(c * 2 * y + a * (x-y));
					}
					else 
					{
						System.out.println(c * 2 * x);
					}
				}
			}
		    scanner.close(); } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int a = scanner.nextInt(); a scanner.nextInt() scanner.nextInt scanner int b = scanner.nextInt(); b scanner.nextInt() scanner.nextInt scanner int c = scanner.nextInt(); c scanner.nextInt() scanner.nextInt scanner int x = scanner.nextInt(); x scanner.nextInt() scanner.nextInt scanner int y = scanner.nextInt(); y scanner.nextInt() scanner.nextInt scanner if( a + b <= 2 * c ) 
			{
				System.out.println(a * x + b * y);
			}
			else  // 2c < a + b 
			{
				if( x == y ) 
				{
					System.out.println(c * x * 2);
				}
				else if( x < y ) 
				{
					if(b < 2 * c) 
					{
						System.out.println(c * 2 * x + b * (y-x));
					}
					else 
					{
						System.out.println(c * 2 * y);
					}
				}
				else
				{
					if(a < 2 * c) 
					{
						System.out.println(c * 2 * y + a * (x-y));
					}
					else 
					{
						System.out.println(c * 2 * x);
					}
				}
			} a + b <= 2 * c a + b a b 2 * c 2 c {
				System.out.println(a * x + b * y);
			} System.out.println(a * x + b * y) System.out.println System.out System System.out a * x + b * y a * x a x b * y b y {
				if( x == y ) 
				{
					System.out.println(c * x * 2);
				}
				else if( x < y ) 
				{
					if(b < 2 * c) 
					{
						System.out.println(c * 2 * x + b * (y-x));
					}
					else 
					{
						System.out.println(c * 2 * y);
					}
				}
				else
				{
					if(a < 2 * c) 
					{
						System.out.println(c * 2 * y + a * (x-y));
					}
					else 
					{
						System.out.println(c * 2 * x);
					}
				}
			} if( x == y ) 
				{
					System.out.println(c * x * 2);
				}
				else if( x < y ) 
				{
					if(b < 2 * c) 
					{
						System.out.println(c * 2 * x + b * (y-x));
					}
					else 
					{
						System.out.println(c * 2 * y);
					}
				}
				else
				{
					if(a < 2 * c) 
					{
						System.out.println(c * 2 * y + a * (x-y));
					}
					else 
					{
						System.out.println(c * 2 * x);
					}
				} x == y x y {
					System.out.println(c * x * 2);
				} System.out.println(c * x * 2) System.out.println System.out System System.out c * x * 2 c * x * 2 c x 2 if( x < y ) 
				{
					if(b < 2 * c) 
					{
						System.out.println(c * 2 * x + b * (y-x));
					}
					else 
					{
						System.out.println(c * 2 * y);
					}
				}
				else
				{
					if(a < 2 * c) 
					{
						System.out.println(c * 2 * y + a * (x-y));
					}
					else 
					{
						System.out.println(c * 2 * x);
					}
				} x < y x y {
					if(b < 2 * c) 
					{
						System.out.println(c * 2 * x + b * (y-x));
					}
					else 
					{
						System.out.println(c * 2 * y);
					}
				} if(b < 2 * c) 
					{
						System.out.println(c * 2 * x + b * (y-x));
					}
					else 
					{
						System.out.println(c * 2 * y);
					} b < 2 * c b 2 * c 2 c {
						System.out.println(c * 2 * x + b * (y-x));
					} System.out.println(c * 2 * x + b * (y-x)) System.out.println System.out System System.out c * 2 * x + b * (y-x) c * 2 * x c * 2 * x c 2 x b * (y-x) b (y-x) y x {
						System.out.println(c * 2 * y);
					} System.out.println(c * 2 * y) System.out.println System.out System System.out c * 2 * y c * 2 * y c 2 y {
					if(a < 2 * c) 
					{
						System.out.println(c * 2 * y + a * (x-y));
					}
					else 
					{
						System.out.println(c * 2 * x);
					}
				} if(a < 2 * c) 
					{
						System.out.println(c * 2 * y + a * (x-y));
					}
					else 
					{
						System.out.println(c * 2 * x);
					} a < 2 * c a 2 * c 2 c {
						System.out.println(c * 2 * y + a * (x-y));
					} System.out.println(c * 2 * y + a * (x-y)) System.out.println System.out System System.out c * 2 * y + a * (x-y) c * 2 * y c * 2 * y c 2 y a * (x-y) a (x-y) x y {
						System.out.println(c * 2 * x);
					} System.out.println(c * 2 * x) System.out.println System.out System System.out c * 2 * x c * 2 * x c 2 x scanner.close() scanner.close scanner String args[] args public class Main {
	  
	public static void main(String args[]) {
		    Scanner scanner = new Scanner(System.in);
		   
			int a = scanner.nextInt();
			int b = scanner.nextInt();
			int c = scanner.nextInt();
			int x = scanner.nextInt();
			int y = scanner.nextInt();
			
			if( a + b <= 2 * c ) 
			{
				System.out.println(a * x + b * y);
			}
			else  // 2c < a + b 
			{
				if( x == y ) 
				{
					System.out.println(c * x * 2);
				}
				else if( x < y ) 
				{
					if(b < 2 * c) 
					{
						System.out.println(c * 2 * x + b * (y-x));
					}
					else 
					{
						System.out.println(c * 2 * y);
					}
				}
				else
				{
					if(a < 2 * c) 
					{
						System.out.println(c * 2 * y + a * (x-y));
					}
					else 
					{
						System.out.println(c * 2 * x);
					}
				}
			}
		    scanner.close(); }
		  } public class Main {
	  
	public static void main(String args[]) {
		    Scanner scanner = new Scanner(System.in);
		   
			int a = scanner.nextInt();
			int b = scanner.nextInt();
			int c = scanner.nextInt();
			int x = scanner.nextInt();
			int y = scanner.nextInt();
			
			if( a + b <= 2 * c ) 
			{
				System.out.println(a * x + b * y);
			}
			else  // 2c < a + b 
			{
				if( x == y ) 
				{
					System.out.println(c * x * 2);
				}
				else if( x < y ) 
				{
					if(b < 2 * c) 
					{
						System.out.println(c * 2 * x + b * (y-x));
					}
					else 
					{
						System.out.println(c * 2 * y);
					}
				}
				else
				{
					if(a < 2 * c) 
					{
						System.out.println(c * 2 * y + a * (x-y));
					}
					else 
					{
						System.out.println(c * 2 * x);
					}
				}
			}
		    scanner.close(); }
		  } Main
import java.util.Scanner;

public class Main {
	  
	public static void main(String args[]) {
		    Scanner scanner = new Scanner(System.in);
		   
			int a = scanner.nextInt();
			int b = scanner.nextInt();
			int c = scanner.nextInt();
			int x = scanner.nextInt();
			int y = scanner.nextInt();
			
			if( a + b <= 2 * c ) 
			{
				System.out.println(a * x + b * y);
			}
			else  // 2c < a + b 
			{
				if( x == y ) 
				{
					System.out.println(c * x * 2);
				}
				else if( x < y ) 
				{
					if(b < 2 * c) 
					{
						System.out.println(c * 2 * x + b * (y-x));
					}
					else 
					{
						System.out.println(c * 2 * y);
					}
				}
				else
				{
					if(a < 2 * c) 
					{
						System.out.println(c * 2 * y + a * (x-y));
					}
					else 
					{
						System.out.println(c * 2 * x);
					}
				}
			}
		    scanner.close(); }
		  }