import java.util.Scanner;
public class Main {

	public static void main(String[] args) {
		int a,b,c,x,y = 0;

		Scanner scan = new Scanner(System.in);
		a = Integer.parseInt(scan.next());
		b = Integer.parseInt(scan.next());
		c = Integer.parseInt(scan.next());
		x = Integer.parseInt(scan.next());
		y = Integer.parseInt(scan.next());

/*		for(int i=x;i>=0;i--) {
			int sumx = (a * i) + (x - i)*2*c;
			System.out.println(sumx);
		}
		System.out.println("--------");

		for(int j=y;j>=0;j--) {
			int sumy = (b * j) + (y - j)*2*c;
			System.out.println(sumy);
		}*/

		int num_max = 0;
		if(x > y) {
			num_max = x;
		}else {
			num_max = y;
		}

		int sum = 0;
		for(int i=0;i<=num_max;i++) {

			int sum1 = (x - i)*a;
			int sum2 = (y -i)*b;
			int sum3 = 2*i*c;

			if(sum1 < 0) {
				sum1 = 0;
			}
			if(sum2 < 0) {
				sum2 =0;
			}

			int suma = sum1 + sum2 + sum3;
			if (sum == 0) {
				sum = suma;
			}else if(suma < sum) {
				sum = suma;
			}

		}
		System.out.println(sum);
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		int a,b,c,x,y = 0;

		Scanner scan = new Scanner(System.in);
		a = Integer.parseInt(scan.next());
		b = Integer.parseInt(scan.next());
		c = Integer.parseInt(scan.next());
		x = Integer.parseInt(scan.next());
		y = Integer.parseInt(scan.next());

/*		for(int i=x;i>=0;i--) {
			int sumx = (a * i) + (x - i)*2*c;
			System.out.println(sumx);
		}
		System.out.println("--------");

		for(int j=y;j>=0;j--) {
			int sumy = (b * j) + (y - j)*2*c;
			System.out.println(sumy);
		}*/

		int num_max = 0;
		if(x > y) {
			num_max = x;
		}else {
			num_max = y;
		}

		int sum = 0;
		for(int i=0;i<=num_max;i++) {

			int sum1 = (x - i)*a;
			int sum2 = (y -i)*b;
			int sum3 = 2*i*c;

			if(sum1 < 0) {
				sum1 = 0;
			}
			if(sum2 < 0) {
				sum2 =0;
			}

			int suma = sum1 + sum2 + sum3;
			if (sum == 0) {
				sum = suma;
			}else if(suma < sum) {
				sum = suma;
			}

		}
		System.out.println(sum);
	}
} Main public static void main(String[] args) {
		int a,b,c,x,y = 0;

		Scanner scan = new Scanner(System.in);
		a = Integer.parseInt(scan.next());
		b = Integer.parseInt(scan.next());
		c = Integer.parseInt(scan.next());
		x = Integer.parseInt(scan.next());
		y = Integer.parseInt(scan.next());

/*		for(int i=x;i>=0;i--) {
			int sumx = (a * i) + (x - i)*2*c;
			System.out.println(sumx);
		}
		System.out.println("--------");

		for(int j=y;j>=0;j--) {
			int sumy = (b * j) + (y - j)*2*c;
			System.out.println(sumy);
		}*/

		int num_max = 0;
		if(x > y) {
			num_max = x;
		}else {
			num_max = y;
		}

		int sum = 0;
		for(int i=0;i<=num_max;i++) {

			int sum1 = (x - i)*a;
			int sum2 = (y -i)*b;
			int sum3 = 2*i*c;

			if(sum1 < 0) {
				sum1 = 0;
			}
			if(sum2 < 0) {
				sum2 =0;
			}

			int suma = sum1 + sum2 + sum3;
			if (sum == 0) {
				sum = suma;
			}else if(suma < sum) {
				sum = suma;
			}

		}
		System.out.println(sum);
	} main {
		int a,b,c,x,y = 0;

		Scanner scan = new Scanner(System.in);
		a = Integer.parseInt(scan.next());
		b = Integer.parseInt(scan.next());
		c = Integer.parseInt(scan.next());
		x = Integer.parseInt(scan.next());
		y = Integer.parseInt(scan.next());

/*		for(int i=x;i>=0;i--) {
			int sumx = (a * i) + (x - i)*2*c;
			System.out.println(sumx);
		}
		System.out.println("--------");

		for(int j=y;j>=0;j--) {
			int sumy = (b * j) + (y - j)*2*c;
			System.out.println(sumy);
		}*/

		int num_max = 0;
		if(x > y) {
			num_max = x;
		}else {
			num_max = y;
		}

		int sum = 0;
		for(int i=0;i<=num_max;i++) {

			int sum1 = (x - i)*a;
			int sum2 = (y -i)*b;
			int sum3 = 2*i*c;

			if(sum1 < 0) {
				sum1 = 0;
			}
			if(sum2 < 0) {
				sum2 =0;
			}

			int suma = sum1 + sum2 + sum3;
			if (sum == 0) {
				sum = suma;
			}else if(suma < sum) {
				sum = suma;
			}

		}
		System.out.println(sum);
	} int a a b b c c x x y = 0; y 0 Scanner scan = new Scanner(System.in); scan new Scanner(System.in) a = Integer.parseInt(scan.next()) a Integer.parseInt(scan.next()) Integer.parseInt Integer scan.next() scan.next scan b = Integer.parseInt(scan.next()) b Integer.parseInt(scan.next()) Integer.parseInt Integer scan.next() scan.next scan c = Integer.parseInt(scan.next()) c Integer.parseInt(scan.next()) Integer.parseInt Integer scan.next() scan.next scan x = Integer.parseInt(scan.next()) x Integer.parseInt(scan.next()) Integer.parseInt Integer scan.next() scan.next scan y = Integer.parseInt(scan.next()) y Integer.parseInt(scan.next()) Integer.parseInt Integer scan.next() scan.next scan int num_max = 0; num_max 0 if(x > y) {
			num_max = x;
		}else {
			num_max = y;
		} x > y x y {
			num_max = x;
		} num_max = x num_max x {
			num_max = y;
		} num_max = y num_max y int sum = 0; sum 0 for(int i=0;i<=num_max;i++) {

			int sum1 = (x - i)*a;
			int sum2 = (y -i)*b;
			int sum3 = 2*i*c;

			if(sum1 < 0) {
				sum1 = 0;
			}
			if(sum2 < 0) {
				sum2 =0;
			}

			int suma = sum1 + sum2 + sum3;
			if (sum == 0) {
				sum = suma;
			}else if(suma < sum) {
				sum = suma;
			}

		} int i=0; int i=0; i 0 i<=num_max i num_max i++ i++ i {

			int sum1 = (x - i)*a;
			int sum2 = (y -i)*b;
			int sum3 = 2*i*c;

			if(sum1 < 0) {
				sum1 = 0;
			}
			if(sum2 < 0) {
				sum2 =0;
			}

			int suma = sum1 + sum2 + sum3;
			if (sum == 0) {
				sum = suma;
			}else if(suma < sum) {
				sum = suma;
			}

		} {

			int sum1 = (x - i)*a;
			int sum2 = (y -i)*b;
			int sum3 = 2*i*c;

			if(sum1 < 0) {
				sum1 = 0;
			}
			if(sum2 < 0) {
				sum2 =0;
			}

			int suma = sum1 + sum2 + sum3;
			if (sum == 0) {
				sum = suma;
			}else if(suma < sum) {
				sum = suma;
			}

		} int sum1 = (x - i)*a; sum1 (x - i)*a (x - i) x i a int sum2 = (y -i)*b; sum2 (y -i)*b (y -i) y i b int sum3 = 2*i*c; sum3 2*i*c 2*i*c 2 i c if(sum1 < 0) {
				sum1 = 0;
			} sum1 < 0 sum1 0 {
				sum1 = 0;
			} sum1 = 0 sum1 0 if(sum2 < 0) {
				sum2 =0;
			} sum2 < 0 sum2 0 {
				sum2 =0;
			} sum2 =0 sum2 0 int suma = sum1 + sum2 + sum3; suma sum1 + sum2 + sum3 sum1 + sum2 + sum3 sum1 sum2 sum3 if (sum == 0) {
				sum = suma;
			}else if(suma < sum) {
				sum = suma;
			} sum == 0 sum 0 {
				sum = suma;
			} sum = suma sum suma if(suma < sum) {
				sum = suma;
			} suma < sum suma sum {
				sum = suma;
			} sum = suma sum suma System.out.println(sum) System.out.println System.out System System.out sum String[] args args public class Main {

	public static void main(String[] args) {
		int a,b,c,x,y = 0;

		Scanner scan = new Scanner(System.in);
		a = Integer.parseInt(scan.next());
		b = Integer.parseInt(scan.next());
		c = Integer.parseInt(scan.next());
		x = Integer.parseInt(scan.next());
		y = Integer.parseInt(scan.next());

/*		for(int i=x;i>=0;i--) {
			int sumx = (a * i) + (x - i)*2*c;
			System.out.println(sumx);
		}
		System.out.println("--------");

		for(int j=y;j>=0;j--) {
			int sumy = (b * j) + (y - j)*2*c;
			System.out.println(sumy);
		}*/

		int num_max = 0;
		if(x > y) {
			num_max = x;
		}else {
			num_max = y;
		}

		int sum = 0;
		for(int i=0;i<=num_max;i++) {

			int sum1 = (x - i)*a;
			int sum2 = (y -i)*b;
			int sum3 = 2*i*c;

			if(sum1 < 0) {
				sum1 = 0;
			}
			if(sum2 < 0) {
				sum2 =0;
			}

			int suma = sum1 + sum2 + sum3;
			if (sum == 0) {
				sum = suma;
			}else if(suma < sum) {
				sum = suma;
			}

		}
		System.out.println(sum);
	}
} public class Main {

	public static void main(String[] args) {
		int a,b,c,x,y = 0;

		Scanner scan = new Scanner(System.in);
		a = Integer.parseInt(scan.next());
		b = Integer.parseInt(scan.next());
		c = Integer.parseInt(scan.next());
		x = Integer.parseInt(scan.next());
		y = Integer.parseInt(scan.next());

/*		for(int i=x;i>=0;i--) {
			int sumx = (a * i) + (x - i)*2*c;
			System.out.println(sumx);
		}
		System.out.println("--------");

		for(int j=y;j>=0;j--) {
			int sumy = (b * j) + (y - j)*2*c;
			System.out.println(sumy);
		}*/

		int num_max = 0;
		if(x > y) {
			num_max = x;
		}else {
			num_max = y;
		}

		int sum = 0;
		for(int i=0;i<=num_max;i++) {

			int sum1 = (x - i)*a;
			int sum2 = (y -i)*b;
			int sum3 = 2*i*c;

			if(sum1 < 0) {
				sum1 = 0;
			}
			if(sum2 < 0) {
				sum2 =0;
			}

			int suma = sum1 + sum2 + sum3;
			if (sum == 0) {
				sum = suma;
			}else if(suma < sum) {
				sum = suma;
			}

		}
		System.out.println(sum);
	}
} Main
import java.util.Scanner;
public class Main {

	public static void main(String[] args) {
		int a,b,c,x,y = 0;

		Scanner scan = new Scanner(System.in);
		a = Integer.parseInt(scan.next());
		b = Integer.parseInt(scan.next());
		c = Integer.parseInt(scan.next());
		x = Integer.parseInt(scan.next());
		y = Integer.parseInt(scan.next());

/*		for(int i=x;i>=0;i--) {
			int sumx = (a * i) + (x - i)*2*c;
			System.out.println(sumx);
		}
		System.out.println("--------");

		for(int j=y;j>=0;j--) {
			int sumy = (b * j) + (y - j)*2*c;
			System.out.println(sumy);
		}*/

		int num_max = 0;
		if(x > y) {
			num_max = x;
		}else {
			num_max = y;
		}

		int sum = 0;
		for(int i=0;i<=num_max;i++) {

			int sum1 = (x - i)*a;
			int sum2 = (y -i)*b;
			int sum3 = 2*i*c;

			if(sum1 < 0) {
				sum1 = 0;
			}
			if(sum2 < 0) {
				sum2 =0;
			}

			int suma = sum1 + sum2 + sum3;
			if (sum == 0) {
				sum = suma;
			}else if(suma < sum) {
				sum = suma;
			}

		}
		System.out.println(sum);
	}
}