import java.util.Scanner;

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();
		sc.close();
		int ans = 0;
		int min = Math.min(x, y);
		int minac = Math.min(a, c*2);
		int minbc = Math.min(b, c*2);
		
		if(a+b <= c*2) {
			ans = a*x + b*y;
		}else {
			ans = c*2*min + minac*(x-min) + minbc*(y-min); 
		}
		System.out.println(ans);
	}
} import java.util.Scanner; Scanner 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();
		sc.close();
		int ans = 0;
		int min = Math.min(x, y);
		int minac = Math.min(a, c*2);
		int minbc = Math.min(b, c*2);
		
		if(a+b <= c*2) {
			ans = a*x + b*y;
		}else {
			ans = c*2*min + minac*(x-min) + minbc*(y-min); 
		}
		System.out.println(ans);
	}
} 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();
		sc.close();
		int ans = 0;
		int min = Math.min(x, y);
		int minac = Math.min(a, c*2);
		int minbc = Math.min(b, c*2);
		
		if(a+b <= c*2) {
			ans = a*x + b*y;
		}else {
			ans = c*2*min + minac*(x-min) + minbc*(y-min); 
		}
		System.out.println(ans);
	} 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();
		sc.close();
		int ans = 0;
		int min = Math.min(x, y);
		int minac = Math.min(a, c*2);
		int minbc = Math.min(b, c*2);
		
		if(a+b <= c*2) {
			ans = a*x + b*y;
		}else {
			ans = c*2*min + minac*(x-min) + minbc*(y-min); 
		}
		System.out.println(ans);
	} 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 sc.close() sc.close sc int ans = 0; ans 0 int min = Math.min(x, y); min Math.min(x, y) Math.min Math x y int minac = Math.min(a, c*2); minac Math.min(a, c*2) Math.min Math a c*2 c 2 int minbc = Math.min(b, c*2); minbc Math.min(b, c*2) Math.min Math b c*2 c 2 if(a+b <= c*2) {
			ans = a*x + b*y;
		}else {
			ans = c*2*min + minac*(x-min) + minbc*(y-min); 
		} a+b <= c*2 a+b a b c*2 c 2 {
			ans = a*x + b*y;
		} ans = a*x + b*y ans a*x + b*y a*x a x b*y b y {
			ans = c*2*min + minac*(x-min) + minbc*(y-min); 
		} ans = c*2*min + minac*(x-min) + minbc*(y-min) ans c*2*min + minac*(x-min) + minbc*(y-min) c*2*min + minac*(x-min) + minbc*(y-min) c*2*min c*2*min c 2 min minac*(x-min) minac (x-min) x min minbc*(y-min) minbc (y-min) y min 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 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();
		sc.close();
		int ans = 0;
		int min = Math.min(x, y);
		int minac = Math.min(a, c*2);
		int minbc = Math.min(b, c*2);
		
		if(a+b <= c*2) {
			ans = a*x + b*y;
		}else {
			ans = c*2*min + minac*(x-min) + minbc*(y-min); 
		}
		System.out.println(ans);
	}
} 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();
		sc.close();
		int ans = 0;
		int min = Math.min(x, y);
		int minac = Math.min(a, c*2);
		int minbc = Math.min(b, c*2);
		
		if(a+b <= c*2) {
			ans = a*x + b*y;
		}else {
			ans = c*2*min + minac*(x-min) + minbc*(y-min); 
		}
		System.out.println(ans);
	}
} Main
import java.util.Scanner;

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();
		sc.close();
		int ans = 0;
		int min = Math.min(x, y);
		int minac = Math.min(a, c*2);
		int minbc = Math.min(b, c*2);
		
		if(a+b <= c*2) {
			ans = a*x + b*y;
		}else {
			ans = c*2*min + minac*(x-min) + minbc*(y-min); 
		}
		System.out.println(ans);
	}
}