import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt(), b = sc.nextInt(), c = sc.nextInt();
		int x = sc.nextInt(), y = sc.nextInt();
		int min = x*a+y*b;
		min = Math.min(min, 2*y*c+Math.max(0,x-y)*a);
		min = Math.min(min, 2*x*c+Math.max(0,y-x)*b);
		min = Math.min(min, 2*Math.max(x,y)*c);
		System.out.println(min);
		sc.close();
	}
} 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(), b = sc.nextInt(), c = sc.nextInt();
		int x = sc.nextInt(), y = sc.nextInt();
		int min = x*a+y*b;
		min = Math.min(min, 2*y*c+Math.max(0,x-y)*a);
		min = Math.min(min, 2*x*c+Math.max(0,y-x)*b);
		min = Math.min(min, 2*Math.max(x,y)*c);
		System.out.println(min);
		sc.close();
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt(), b = sc.nextInt(), c = sc.nextInt();
		int x = sc.nextInt(), y = sc.nextInt();
		int min = x*a+y*b;
		min = Math.min(min, 2*y*c+Math.max(0,x-y)*a);
		min = Math.min(min, 2*x*c+Math.max(0,y-x)*b);
		min = Math.min(min, 2*Math.max(x,y)*c);
		System.out.println(min);
		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt(), b = sc.nextInt(), c = sc.nextInt();
		int x = sc.nextInt(), y = sc.nextInt();
		int min = x*a+y*b;
		min = Math.min(min, 2*y*c+Math.max(0,x-y)*a);
		min = Math.min(min, 2*x*c+Math.max(0,y-x)*b);
		min = Math.min(min, 2*Math.max(x,y)*c);
		System.out.println(min);
		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = sc.nextInt() a sc.nextInt() sc.nextInt sc b = sc.nextInt() b sc.nextInt() sc.nextInt sc c = sc.nextInt(); c sc.nextInt() sc.nextInt sc int x = sc.nextInt() x sc.nextInt() sc.nextInt sc y = sc.nextInt(); y sc.nextInt() sc.nextInt sc int min = x*a+y*b; min x*a+y*b x*a x a y*b y b min = Math.min(min, 2*y*c+Math.max(0,x-y)*a) min Math.min(min, 2*y*c+Math.max(0,x-y)*a) Math.min Math min 2*y*c+Math.max(0,x-y)*a 2*y*c 2*y*c 2 y c Math.max(0,x-y)*a Math.max(0,x-y) Math.max Math 0 x-y x y a min = Math.min(min, 2*x*c+Math.max(0,y-x)*b) min Math.min(min, 2*x*c+Math.max(0,y-x)*b) Math.min Math min 2*x*c+Math.max(0,y-x)*b 2*x*c 2*x*c 2 x c Math.max(0,y-x)*b Math.max(0,y-x) Math.max Math 0 y-x y x b min = Math.min(min, 2*Math.max(x,y)*c) min Math.min(min, 2*Math.max(x,y)*c) Math.min Math min 2*Math.max(x,y)*c 2*Math.max(x,y)*c 2 Math.max(x,y) Math.max Math x y c System.out.println(min) System.out.println System.out System System.out min sc.close() sc.close sc String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt(), b = sc.nextInt(), c = sc.nextInt();
		int x = sc.nextInt(), y = sc.nextInt();
		int min = x*a+y*b;
		min = Math.min(min, 2*y*c+Math.max(0,x-y)*a);
		min = Math.min(min, 2*x*c+Math.max(0,y-x)*b);
		min = Math.min(min, 2*Math.max(x,y)*c);
		System.out.println(min);
		sc.close();
	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt(), b = sc.nextInt(), c = sc.nextInt();
		int x = sc.nextInt(), y = sc.nextInt();
		int min = x*a+y*b;
		min = Math.min(min, 2*y*c+Math.max(0,x-y)*a);
		min = Math.min(min, 2*x*c+Math.max(0,y-x)*b);
		min = Math.min(min, 2*Math.max(x,y)*c);
		System.out.println(min);
		sc.close();
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt(), b = sc.nextInt(), c = sc.nextInt();
		int x = sc.nextInt(), y = sc.nextInt();
		int min = x*a+y*b;
		min = Math.min(min, 2*y*c+Math.max(0,x-y)*a);
		min = Math.min(min, 2*x*c+Math.max(0,y-x)*b);
		min = Math.min(min, 2*Math.max(x,y)*c);
		System.out.println(min);
		sc.close();
	}
}