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 price1 = 0;
		int price2 = 0;
		int price3 = 0;
		int price = 0;
		
		//個別
		price2 = (X * A) + (Y * B);
		
		if(X > Y){
			price3 = C * X * 2;
			price1 += C * Y * 2;
			X -= Y;
			price1 += X * A;
		}else{
			price3 = C * Y * 2;
			price1 += C * X * 2;
			Y -= X;
			price1 += Y * B;
		}
		
		price = Math.min(price1, price2);
		price = Math.min(price, price3);
		
		System.out.println(price);
	}
} 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 price1 = 0;
		int price2 = 0;
		int price3 = 0;
		int price = 0;
		
		//個別
		price2 = (X * A) + (Y * B);
		
		if(X > Y){
			price3 = C * X * 2;
			price1 += C * Y * 2;
			X -= Y;
			price1 += X * A;
		}else{
			price3 = C * Y * 2;
			price1 += C * X * 2;
			Y -= X;
			price1 += Y * B;
		}
		
		price = Math.min(price1, price2);
		price = Math.min(price, price3);
		
		System.out.println(price);
	}
} 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 price1 = 0;
		int price2 = 0;
		int price3 = 0;
		int price = 0;
		
		//個別
		price2 = (X * A) + (Y * B);
		
		if(X > Y){
			price3 = C * X * 2;
			price1 += C * Y * 2;
			X -= Y;
			price1 += X * A;
		}else{
			price3 = C * Y * 2;
			price1 += C * X * 2;
			Y -= X;
			price1 += Y * B;
		}
		
		price = Math.min(price1, price2);
		price = Math.min(price, price3);
		
		System.out.println(price);
	} 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 price1 = 0;
		int price2 = 0;
		int price3 = 0;
		int price = 0;
		
		//個別
		price2 = (X * A) + (Y * B);
		
		if(X > Y){
			price3 = C * X * 2;
			price1 += C * Y * 2;
			X -= Y;
			price1 += X * A;
		}else{
			price3 = C * Y * 2;
			price1 += C * X * 2;
			Y -= X;
			price1 += Y * B;
		}
		
		price = Math.min(price1, price2);
		price = Math.min(price, price3);
		
		System.out.println(price);
	} 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 price1 = 0; price1 0 int price2 = 0; price2 0 int price3 = 0; price3 0 int price = 0; price 0 price2 = (X * A) + (Y * B) price2 (X * A) + (Y * B) (X * A) X A (Y * B) Y B if(X > Y){
			price3 = C * X * 2;
			price1 += C * Y * 2;
			X -= Y;
			price1 += X * A;
		}else{
			price3 = C * Y * 2;
			price1 += C * X * 2;
			Y -= X;
			price1 += Y * B;
		} X > Y X Y {
			price3 = C * X * 2;
			price1 += C * Y * 2;
			X -= Y;
			price1 += X * A;
		} price3 = C * X * 2 price3 C * X * 2 C * X * 2 C X 2 price1 += C * Y * 2 price1 C * Y * 2 C * Y * 2 C Y 2 X -= Y X Y price1 += X * A price1 X * A X A {
			price3 = C * Y * 2;
			price1 += C * X * 2;
			Y -= X;
			price1 += Y * B;
		} price3 = C * Y * 2 price3 C * Y * 2 C * Y * 2 C Y 2 price1 += C * X * 2 price1 C * X * 2 C * X * 2 C X 2 Y -= X Y X price1 += Y * B price1 Y * B Y B price = Math.min(price1, price2) price Math.min(price1, price2) Math.min Math price1 price2 price = Math.min(price, price3) price Math.min(price, price3) Math.min Math price price3 System.out.println(price) System.out.println System.out System System.out price String[] args args 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 price1 = 0;
		int price2 = 0;
		int price3 = 0;
		int price = 0;
		
		//個別
		price2 = (X * A) + (Y * B);
		
		if(X > Y){
			price3 = C * X * 2;
			price1 += C * Y * 2;
			X -= Y;
			price1 += X * A;
		}else{
			price3 = C * Y * 2;
			price1 += C * X * 2;
			Y -= X;
			price1 += Y * B;
		}
		
		price = Math.min(price1, price2);
		price = Math.min(price, price3);
		
		System.out.println(price);
	}
} 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 price1 = 0;
		int price2 = 0;
		int price3 = 0;
		int price = 0;
		
		//個別
		price2 = (X * A) + (Y * B);
		
		if(X > Y){
			price3 = C * X * 2;
			price1 += C * Y * 2;
			X -= Y;
			price1 += X * A;
		}else{
			price3 = C * Y * 2;
			price1 += C * X * 2;
			Y -= X;
			price1 += Y * B;
		}
		
		price = Math.min(price1, price2);
		price = Math.min(price, price3);
		
		System.out.println(price);
	}
} 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 price1 = 0;
		int price2 = 0;
		int price3 = 0;
		int price = 0;
		
		//個別
		price2 = (X * A) + (Y * B);
		
		if(X > Y){
			price3 = C * X * 2;
			price1 += C * Y * 2;
			X -= Y;
			price1 += X * A;
		}else{
			price3 = C * Y * 2;
			price1 += C * X * 2;
			Y -= X;
			price1 += Y * B;
		}
		
		price = Math.min(price1, price2);
		price = Math.min(price, price3);
		
		System.out.println(price);
	}
}
