import java.util.Scanner;


public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int A = scan.nextInt();
		int B = scan.nextInt();
		int C = scan.nextInt();
		int X = scan.nextInt();
		int Y = scan.nextInt();
		
		
		
		int cheapest_price = A*X + Y*B;
		
		if(A+B<=2*C){
			System.out.println(cheapest_price);
		}
		else{
			for (int i = 0 ; i<=2*X || i<=2*Y ;i=i+2){
				
				if(i>2*X){
					if (cheapest_price > (Y-i/2)*B+ C*i){
						cheapest_price = (Y-i/2)*B+ C*i;
					}
				}
				else if(i>2*Y){
					if (cheapest_price > (X-i/2)*A+ C*i){
						cheapest_price = (X-i/2)*A+ C*i;
					}
				}
				else{ 
					if (cheapest_price > (X-i/2)*A+(Y-i/2)*B+ C*i){
						cheapest_price = (X-i/2)*A+(Y-i/2)*B+ C*i;
					}
				}
				
			}
			System.out.println(cheapest_price);
		}
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int A = scan.nextInt();
		int B = scan.nextInt();
		int C = scan.nextInt();
		int X = scan.nextInt();
		int Y = scan.nextInt();
		
		
		
		int cheapest_price = A*X + Y*B;
		
		if(A+B<=2*C){
			System.out.println(cheapest_price);
		}
		else{
			for (int i = 0 ; i<=2*X || i<=2*Y ;i=i+2){
				
				if(i>2*X){
					if (cheapest_price > (Y-i/2)*B+ C*i){
						cheapest_price = (Y-i/2)*B+ C*i;
					}
				}
				else if(i>2*Y){
					if (cheapest_price > (X-i/2)*A+ C*i){
						cheapest_price = (X-i/2)*A+ C*i;
					}
				}
				else{ 
					if (cheapest_price > (X-i/2)*A+(Y-i/2)*B+ C*i){
						cheapest_price = (X-i/2)*A+(Y-i/2)*B+ C*i;
					}
				}
				
			}
			System.out.println(cheapest_price);
		}
	}
} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int A = scan.nextInt();
		int B = scan.nextInt();
		int C = scan.nextInt();
		int X = scan.nextInt();
		int Y = scan.nextInt();
		
		
		
		int cheapest_price = A*X + Y*B;
		
		if(A+B<=2*C){
			System.out.println(cheapest_price);
		}
		else{
			for (int i = 0 ; i<=2*X || i<=2*Y ;i=i+2){
				
				if(i>2*X){
					if (cheapest_price > (Y-i/2)*B+ C*i){
						cheapest_price = (Y-i/2)*B+ C*i;
					}
				}
				else if(i>2*Y){
					if (cheapest_price > (X-i/2)*A+ C*i){
						cheapest_price = (X-i/2)*A+ C*i;
					}
				}
				else{ 
					if (cheapest_price > (X-i/2)*A+(Y-i/2)*B+ C*i){
						cheapest_price = (X-i/2)*A+(Y-i/2)*B+ C*i;
					}
				}
				
			}
			System.out.println(cheapest_price);
		}
	} main {
		Scanner scan = new Scanner(System.in);
		int A = scan.nextInt();
		int B = scan.nextInt();
		int C = scan.nextInt();
		int X = scan.nextInt();
		int Y = scan.nextInt();
		
		
		
		int cheapest_price = A*X + Y*B;
		
		if(A+B<=2*C){
			System.out.println(cheapest_price);
		}
		else{
			for (int i = 0 ; i<=2*X || i<=2*Y ;i=i+2){
				
				if(i>2*X){
					if (cheapest_price > (Y-i/2)*B+ C*i){
						cheapest_price = (Y-i/2)*B+ C*i;
					}
				}
				else if(i>2*Y){
					if (cheapest_price > (X-i/2)*A+ C*i){
						cheapest_price = (X-i/2)*A+ C*i;
					}
				}
				else{ 
					if (cheapest_price > (X-i/2)*A+(Y-i/2)*B+ C*i){
						cheapest_price = (X-i/2)*A+(Y-i/2)*B+ C*i;
					}
				}
				
			}
			System.out.println(cheapest_price);
		}
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int A = scan.nextInt(); A scan.nextInt() scan.nextInt scan int B = scan.nextInt(); B scan.nextInt() scan.nextInt scan int C = scan.nextInt(); C scan.nextInt() scan.nextInt scan int X = scan.nextInt(); X scan.nextInt() scan.nextInt scan int Y = scan.nextInt(); Y scan.nextInt() scan.nextInt scan int cheapest_price = A*X + Y*B; cheapest_price A*X + Y*B A*X A X Y*B Y B if(A+B<=2*C){
			System.out.println(cheapest_price);
		}
		else{
			for (int i = 0 ; i<=2*X || i<=2*Y ;i=i+2){
				
				if(i>2*X){
					if (cheapest_price > (Y-i/2)*B+ C*i){
						cheapest_price = (Y-i/2)*B+ C*i;
					}
				}
				else if(i>2*Y){
					if (cheapest_price > (X-i/2)*A+ C*i){
						cheapest_price = (X-i/2)*A+ C*i;
					}
				}
				else{ 
					if (cheapest_price > (X-i/2)*A+(Y-i/2)*B+ C*i){
						cheapest_price = (X-i/2)*A+(Y-i/2)*B+ C*i;
					}
				}
				
			}
			System.out.println(cheapest_price);
		} A+B<=2*C A+B A B 2*C 2 C {
			System.out.println(cheapest_price);
		} System.out.println(cheapest_price) System.out.println System.out System System.out cheapest_price {
			for (int i = 0 ; i<=2*X || i<=2*Y ;i=i+2){
				
				if(i>2*X){
					if (cheapest_price > (Y-i/2)*B+ C*i){
						cheapest_price = (Y-i/2)*B+ C*i;
					}
				}
				else if(i>2*Y){
					if (cheapest_price > (X-i/2)*A+ C*i){
						cheapest_price = (X-i/2)*A+ C*i;
					}
				}
				else{ 
					if (cheapest_price > (X-i/2)*A+(Y-i/2)*B+ C*i){
						cheapest_price = (X-i/2)*A+(Y-i/2)*B+ C*i;
					}
				}
				
			}
			System.out.println(cheapest_price);
		} for (int i = 0 ; i<=2*X || i<=2*Y ;i=i+2){
				
				if(i>2*X){
					if (cheapest_price > (Y-i/2)*B+ C*i){
						cheapest_price = (Y-i/2)*B+ C*i;
					}
				}
				else if(i>2*Y){
					if (cheapest_price > (X-i/2)*A+ C*i){
						cheapest_price = (X-i/2)*A+ C*i;
					}
				}
				else{ 
					if (cheapest_price > (X-i/2)*A+(Y-i/2)*B+ C*i){
						cheapest_price = (X-i/2)*A+(Y-i/2)*B+ C*i;
					}
				}
				
			} int i = 0 ; int i = 0 ; i 0 i<=2*X || i<=2*Y i<=2*X i 2*X 2 X i<=2*Y i 2*Y 2 Y i=i+2 i=i+2 i i+2 i 2 {
				
				if(i>2*X){
					if (cheapest_price > (Y-i/2)*B+ C*i){
						cheapest_price = (Y-i/2)*B+ C*i;
					}
				}
				else if(i>2*Y){
					if (cheapest_price > (X-i/2)*A+ C*i){
						cheapest_price = (X-i/2)*A+ C*i;
					}
				}
				else{ 
					if (cheapest_price > (X-i/2)*A+(Y-i/2)*B+ C*i){
						cheapest_price = (X-i/2)*A+(Y-i/2)*B+ C*i;
					}
				}
				
			} {
				
				if(i>2*X){
					if (cheapest_price > (Y-i/2)*B+ C*i){
						cheapest_price = (Y-i/2)*B+ C*i;
					}
				}
				else if(i>2*Y){
					if (cheapest_price > (X-i/2)*A+ C*i){
						cheapest_price = (X-i/2)*A+ C*i;
					}
				}
				else{ 
					if (cheapest_price > (X-i/2)*A+(Y-i/2)*B+ C*i){
						cheapest_price = (X-i/2)*A+(Y-i/2)*B+ C*i;
					}
				}
				
			} if(i>2*X){
					if (cheapest_price > (Y-i/2)*B+ C*i){
						cheapest_price = (Y-i/2)*B+ C*i;
					}
				}
				else if(i>2*Y){
					if (cheapest_price > (X-i/2)*A+ C*i){
						cheapest_price = (X-i/2)*A+ C*i;
					}
				}
				else{ 
					if (cheapest_price > (X-i/2)*A+(Y-i/2)*B+ C*i){
						cheapest_price = (X-i/2)*A+(Y-i/2)*B+ C*i;
					}
				} i>2*X i 2*X 2 X {
					if (cheapest_price > (Y-i/2)*B+ C*i){
						cheapest_price = (Y-i/2)*B+ C*i;
					}
				} if (cheapest_price > (Y-i/2)*B+ C*i){
						cheapest_price = (Y-i/2)*B+ C*i;
					} cheapest_price > (Y-i/2)*B+ C*i cheapest_price (Y-i/2)*B+ C*i (Y-i/2)*B (Y-i/2) Y i/2 i 2 B C*i C i {
						cheapest_price = (Y-i/2)*B+ C*i;
					} cheapest_price = (Y-i/2)*B+ C*i cheapest_price (Y-i/2)*B+ C*i (Y-i/2)*B (Y-i/2) Y i/2 i 2 B C*i C i if(i>2*Y){
					if (cheapest_price > (X-i/2)*A+ C*i){
						cheapest_price = (X-i/2)*A+ C*i;
					}
				}
				else{ 
					if (cheapest_price > (X-i/2)*A+(Y-i/2)*B+ C*i){
						cheapest_price = (X-i/2)*A+(Y-i/2)*B+ C*i;
					}
				} i>2*Y i 2*Y 2 Y {
					if (cheapest_price > (X-i/2)*A+ C*i){
						cheapest_price = (X-i/2)*A+ C*i;
					}
				} if (cheapest_price > (X-i/2)*A+ C*i){
						cheapest_price = (X-i/2)*A+ C*i;
					} cheapest_price > (X-i/2)*A+ C*i cheapest_price (X-i/2)*A+ C*i (X-i/2)*A (X-i/2) X i/2 i 2 A C*i C i {
						cheapest_price = (X-i/2)*A+ C*i;
					} cheapest_price = (X-i/2)*A+ C*i cheapest_price (X-i/2)*A+ C*i (X-i/2)*A (X-i/2) X i/2 i 2 A C*i C i { 
					if (cheapest_price > (X-i/2)*A+(Y-i/2)*B+ C*i){
						cheapest_price = (X-i/2)*A+(Y-i/2)*B+ C*i;
					}
				} if (cheapest_price > (X-i/2)*A+(Y-i/2)*B+ C*i){
						cheapest_price = (X-i/2)*A+(Y-i/2)*B+ C*i;
					} cheapest_price > (X-i/2)*A+(Y-i/2)*B+ C*i cheapest_price (X-i/2)*A+(Y-i/2)*B+ C*i (X-i/2)*A+(Y-i/2)*B+ C*i (X-i/2)*A (X-i/2) X i/2 i 2 A (Y-i/2)*B (Y-i/2) Y i/2 i 2 B C*i C i {
						cheapest_price = (X-i/2)*A+(Y-i/2)*B+ C*i;
					} cheapest_price = (X-i/2)*A+(Y-i/2)*B+ C*i cheapest_price (X-i/2)*A+(Y-i/2)*B+ C*i (X-i/2)*A+(Y-i/2)*B+ C*i (X-i/2)*A (X-i/2) X i/2 i 2 A (Y-i/2)*B (Y-i/2) Y i/2 i 2 B C*i C i System.out.println(cheapest_price) System.out.println System.out System System.out cheapest_price String[] args args public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int A = scan.nextInt();
		int B = scan.nextInt();
		int C = scan.nextInt();
		int X = scan.nextInt();
		int Y = scan.nextInt();
		
		
		
		int cheapest_price = A*X + Y*B;
		
		if(A+B<=2*C){
			System.out.println(cheapest_price);
		}
		else{
			for (int i = 0 ; i<=2*X || i<=2*Y ;i=i+2){
				
				if(i>2*X){
					if (cheapest_price > (Y-i/2)*B+ C*i){
						cheapest_price = (Y-i/2)*B+ C*i;
					}
				}
				else if(i>2*Y){
					if (cheapest_price > (X-i/2)*A+ C*i){
						cheapest_price = (X-i/2)*A+ C*i;
					}
				}
				else{ 
					if (cheapest_price > (X-i/2)*A+(Y-i/2)*B+ C*i){
						cheapest_price = (X-i/2)*A+(Y-i/2)*B+ C*i;
					}
				}
				
			}
			System.out.println(cheapest_price);
		}
	}
} public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int A = scan.nextInt();
		int B = scan.nextInt();
		int C = scan.nextInt();
		int X = scan.nextInt();
		int Y = scan.nextInt();
		
		
		
		int cheapest_price = A*X + Y*B;
		
		if(A+B<=2*C){
			System.out.println(cheapest_price);
		}
		else{
			for (int i = 0 ; i<=2*X || i<=2*Y ;i=i+2){
				
				if(i>2*X){
					if (cheapest_price > (Y-i/2)*B+ C*i){
						cheapest_price = (Y-i/2)*B+ C*i;
					}
				}
				else if(i>2*Y){
					if (cheapest_price > (X-i/2)*A+ C*i){
						cheapest_price = (X-i/2)*A+ C*i;
					}
				}
				else{ 
					if (cheapest_price > (X-i/2)*A+(Y-i/2)*B+ C*i){
						cheapest_price = (X-i/2)*A+(Y-i/2)*B+ C*i;
					}
				}
				
			}
			System.out.println(cheapest_price);
		}
	}
} Main
import java.util.Scanner;


public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int A = scan.nextInt();
		int B = scan.nextInt();
		int C = scan.nextInt();
		int X = scan.nextInt();
		int Y = scan.nextInt();
		
		
		
		int cheapest_price = A*X + Y*B;
		
		if(A+B<=2*C){
			System.out.println(cheapest_price);
		}
		else{
			for (int i = 0 ; i<=2*X || i<=2*Y ;i=i+2){
				
				if(i>2*X){
					if (cheapest_price > (Y-i/2)*B+ C*i){
						cheapest_price = (Y-i/2)*B+ C*i;
					}
				}
				else if(i>2*Y){
					if (cheapest_price > (X-i/2)*A+ C*i){
						cheapest_price = (X-i/2)*A+ C*i;
					}
				}
				else{ 
					if (cheapest_price > (X-i/2)*A+(Y-i/2)*B+ C*i){
						cheapest_price = (X-i/2)*A+(Y-i/2)*B+ C*i;
					}
				}
				
			}
			System.out.println(cheapest_price);
		}
	}
}