import java.util.*;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a[] = new int[3];
		for(int i = 0; i < 3; ++i)
			a[i] = sc.nextInt();
		int x = sc.nextInt(), y = sc.nextInt();
		sc.close();
		int ans = 1000000000;
		for(int i = 0; i <= 2 * Math.max(x,  y); i += 2) {
			int tmp = a[0] * (x - (i / 2)) + a[1] * (y - (i / 2)) + a[2] * i;
			if(x < i / 2)tmp += a[0] * ((i / 2) - x);
			if(y < i / 2)tmp += a[1] * ((i / 2) - y);
			ans = Math.min(ans,  tmp);
		}
		System.out.println(ans);
	}

} import java.util.*; util.* java public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a[] = new int[3];
		for(int i = 0; i < 3; ++i)
			a[i] = sc.nextInt();
		int x = sc.nextInt(), y = sc.nextInt();
		sc.close();
		int ans = 1000000000;
		for(int i = 0; i <= 2 * Math.max(x,  y); i += 2) {
			int tmp = a[0] * (x - (i / 2)) + a[1] * (y - (i / 2)) + a[2] * i;
			if(x < i / 2)tmp += a[0] * ((i / 2) - x);
			if(y < i / 2)tmp += a[1] * ((i / 2) - y);
			ans = Math.min(ans,  tmp);
		}
		System.out.println(ans);
	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a[] = new int[3];
		for(int i = 0; i < 3; ++i)
			a[i] = sc.nextInt();
		int x = sc.nextInt(), y = sc.nextInt();
		sc.close();
		int ans = 1000000000;
		for(int i = 0; i <= 2 * Math.max(x,  y); i += 2) {
			int tmp = a[0] * (x - (i / 2)) + a[1] * (y - (i / 2)) + a[2] * i;
			if(x < i / 2)tmp += a[0] * ((i / 2) - x);
			if(y < i / 2)tmp += a[1] * ((i / 2) - y);
			ans = Math.min(ans,  tmp);
		}
		System.out.println(ans);
	} main {
		Scanner sc = new Scanner(System.in);
		int a[] = new int[3];
		for(int i = 0; i < 3; ++i)
			a[i] = sc.nextInt();
		int x = sc.nextInt(), y = sc.nextInt();
		sc.close();
		int ans = 1000000000;
		for(int i = 0; i <= 2 * Math.max(x,  y); i += 2) {
			int tmp = a[0] * (x - (i / 2)) + a[1] * (y - (i / 2)) + a[2] * i;
			if(x < i / 2)tmp += a[0] * ((i / 2) - x);
			if(y < i / 2)tmp += a[1] * ((i / 2) - y);
			ans = Math.min(ans,  tmp);
		}
		System.out.println(ans);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a[] = new int[3]; a new int[3] 3 for(int i = 0; i < 3; ++i)
			a[i] = sc.nextInt(); int i = 0; int i = 0; i 0 i < 3 i 3 ++i ++i i a[i] = sc.nextInt(); a[i] = sc.nextInt() a[i] a i sc.nextInt() sc.nextInt sc int x = sc.nextInt() x sc.nextInt() sc.nextInt sc y = sc.nextInt(); y sc.nextInt() sc.nextInt sc sc.close() sc.close sc int ans = 1000000000; ans 1000000000 for(int i = 0; i <= 2 * Math.max(x,  y); i += 2) {
			int tmp = a[0] * (x - (i / 2)) + a[1] * (y - (i / 2)) + a[2] * i;
			if(x < i / 2)tmp += a[0] * ((i / 2) - x);
			if(y < i / 2)tmp += a[1] * ((i / 2) - y);
			ans = Math.min(ans,  tmp);
		} int i = 0; int i = 0; i 0 i <= 2 * Math.max(x,  y) i 2 * Math.max(x,  y) 2 Math.max(x,  y) Math.max Math x y i += 2 i += 2 i 2 {
			int tmp = a[0] * (x - (i / 2)) + a[1] * (y - (i / 2)) + a[2] * i;
			if(x < i / 2)tmp += a[0] * ((i / 2) - x);
			if(y < i / 2)tmp += a[1] * ((i / 2) - y);
			ans = Math.min(ans,  tmp);
		} {
			int tmp = a[0] * (x - (i / 2)) + a[1] * (y - (i / 2)) + a[2] * i;
			if(x < i / 2)tmp += a[0] * ((i / 2) - x);
			if(y < i / 2)tmp += a[1] * ((i / 2) - y);
			ans = Math.min(ans,  tmp);
		} int tmp = a[0] * (x - (i / 2)) + a[1] * (y - (i / 2)) + a[2] * i; tmp a[0] * (x - (i / 2)) + a[1] * (y - (i / 2)) + a[2] * i a[0] * (x - (i / 2)) + a[1] * (y - (i / 2)) + a[2] * i a[0] * (x - (i / 2)) a[0] a 0 (x - (i / 2)) x (i / 2) i 2 a[1] * (y - (i / 2)) a[1] a 1 (y - (i / 2)) y (i / 2) i 2 a[2] * i a[2] a 2 i if(x < i / 2)tmp += a[0] * ((i / 2) - x); x < i / 2 x i / 2 i 2 tmp += a[0] * ((i / 2) - x) tmp a[0] * ((i / 2) - x) a[0] a 0 ((i / 2) - x) (i / 2) i 2 x if(y < i / 2)tmp += a[1] * ((i / 2) - y); y < i / 2 y i / 2 i 2 tmp += a[1] * ((i / 2) - y) tmp a[1] * ((i / 2) - y) a[1] a 1 ((i / 2) - y) (i / 2) i 2 y ans = Math.min(ans,  tmp) ans Math.min(ans,  tmp) Math.min Math ans tmp 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[] = new int[3];
		for(int i = 0; i < 3; ++i)
			a[i] = sc.nextInt();
		int x = sc.nextInt(), y = sc.nextInt();
		sc.close();
		int ans = 1000000000;
		for(int i = 0; i <= 2 * Math.max(x,  y); i += 2) {
			int tmp = a[0] * (x - (i / 2)) + a[1] * (y - (i / 2)) + a[2] * i;
			if(x < i / 2)tmp += a[0] * ((i / 2) - x);
			if(y < i / 2)tmp += a[1] * ((i / 2) - y);
			ans = Math.min(ans,  tmp);
		}
		System.out.println(ans);
	}

} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a[] = new int[3];
		for(int i = 0; i < 3; ++i)
			a[i] = sc.nextInt();
		int x = sc.nextInt(), y = sc.nextInt();
		sc.close();
		int ans = 1000000000;
		for(int i = 0; i <= 2 * Math.max(x,  y); i += 2) {
			int tmp = a[0] * (x - (i / 2)) + a[1] * (y - (i / 2)) + a[2] * i;
			if(x < i / 2)tmp += a[0] * ((i / 2) - x);
			if(y < i / 2)tmp += a[1] * ((i / 2) - y);
			ans = Math.min(ans,  tmp);
		}
		System.out.println(ans);
	}

} Main
import java.util.*;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a[] = new int[3];
		for(int i = 0; i < 3; ++i)
			a[i] = sc.nextInt();
		int x = sc.nextInt(), y = sc.nextInt();
		sc.close();
		int ans = 1000000000;
		for(int i = 0; i <= 2 * Math.max(x,  y); i += 2) {
			int tmp = a[0] * (x - (i / 2)) + a[1] * (y - (i / 2)) + a[2] * i;
			if(x < i / 2)tmp += a[0] * ((i / 2) - x);
			if(y < i / 2)tmp += a[1] * ((i / 2) - y);
			ans = Math.min(ans,  tmp);
		}
		System.out.println(ans);
	}

}
