import java.util.Arrays;
import java.util.Scanner;

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 abprice = A * X + B * Y;

		int target1 = 0;
		int target1_2 = 0;
		int target2 = 0;
		int dif = 0;
		if (X < Y) {
			target1 = X;
			target1_2 = Y;
			target2 = B;
			dif = Y - X;
		} else {
			target1 = Y;
			target1_2 = X;
			target2 = A;
			dif = X - Y;
		}

		int cprice1 = C * target1 * 2 + dif * target2;
		int cprice2 = C * target1_2 * 2;
		int cprice = cprice1 > cprice2 ? cprice2 : cprice1;

		if (abprice > cprice) {
			System.out.println(cprice);
		} else {
			System.out.println(abprice);
		}

	}
} import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util 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 abprice = A * X + B * Y;

		int target1 = 0;
		int target1_2 = 0;
		int target2 = 0;
		int dif = 0;
		if (X < Y) {
			target1 = X;
			target1_2 = Y;
			target2 = B;
			dif = Y - X;
		} else {
			target1 = Y;
			target1_2 = X;
			target2 = A;
			dif = X - Y;
		}

		int cprice1 = C * target1 * 2 + dif * target2;
		int cprice2 = C * target1_2 * 2;
		int cprice = cprice1 > cprice2 ? cprice2 : cprice1;

		if (abprice > cprice) {
			System.out.println(cprice);
		} else {
			System.out.println(abprice);
		}

	}
} 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 abprice = A * X + B * Y;

		int target1 = 0;
		int target1_2 = 0;
		int target2 = 0;
		int dif = 0;
		if (X < Y) {
			target1 = X;
			target1_2 = Y;
			target2 = B;
			dif = Y - X;
		} else {
			target1 = Y;
			target1_2 = X;
			target2 = A;
			dif = X - Y;
		}

		int cprice1 = C * target1 * 2 + dif * target2;
		int cprice2 = C * target1_2 * 2;
		int cprice = cprice1 > cprice2 ? cprice2 : cprice1;

		if (abprice > cprice) {
			System.out.println(cprice);
		} else {
			System.out.println(abprice);
		}

	} 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 abprice = A * X + B * Y;

		int target1 = 0;
		int target1_2 = 0;
		int target2 = 0;
		int dif = 0;
		if (X < Y) {
			target1 = X;
			target1_2 = Y;
			target2 = B;
			dif = Y - X;
		} else {
			target1 = Y;
			target1_2 = X;
			target2 = A;
			dif = X - Y;
		}

		int cprice1 = C * target1 * 2 + dif * target2;
		int cprice2 = C * target1_2 * 2;
		int cprice = cprice1 > cprice2 ? cprice2 : cprice1;

		if (abprice > cprice) {
			System.out.println(cprice);
		} else {
			System.out.println(abprice);
		}

	} 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 abprice = A * X + B * Y; abprice A * X + B * Y A * X A X B * Y B Y int target1 = 0; target1 0 int target1_2 = 0; target1_2 0 int target2 = 0; target2 0 int dif = 0; dif 0 if (X < Y) {
			target1 = X;
			target1_2 = Y;
			target2 = B;
			dif = Y - X;
		} else {
			target1 = Y;
			target1_2 = X;
			target2 = A;
			dif = X - Y;
		} X < Y X Y {
			target1 = X;
			target1_2 = Y;
			target2 = B;
			dif = Y - X;
		} target1 = X target1 X target1_2 = Y target1_2 Y target2 = B target2 B dif = Y - X dif Y - X Y X {
			target1 = Y;
			target1_2 = X;
			target2 = A;
			dif = X - Y;
		} target1 = Y target1 Y target1_2 = X target1_2 X target2 = A target2 A dif = X - Y dif X - Y X Y int cprice1 = C * target1 * 2 + dif * target2; cprice1 C * target1 * 2 + dif * target2 C * target1 * 2 C * target1 * 2 C target1 2 dif * target2 dif target2 int cprice2 = C * target1_2 * 2; cprice2 C * target1_2 * 2 C * target1_2 * 2 C target1_2 2 int cprice = cprice1 > cprice2 ? cprice2 : cprice1; cprice cprice1 > cprice2 ? cprice2 : cprice1 cprice1 > cprice2 cprice1 cprice2 cprice2 cprice1 if (abprice > cprice) {
			System.out.println(cprice);
		} else {
			System.out.println(abprice);
		} abprice > cprice abprice cprice {
			System.out.println(cprice);
		} System.out.println(cprice) System.out.println System.out System System.out cprice {
			System.out.println(abprice);
		} System.out.println(abprice) System.out.println System.out System System.out abprice String args[] args
import java.util.Arrays;
import java.util.Scanner;

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 abprice = A * X + B * Y;

		int target1 = 0;
		int target1_2 = 0;
		int target2 = 0;
		int dif = 0;
		if (X < Y) {
			target1 = X;
			target1_2 = Y;
			target2 = B;
			dif = Y - X;
		} else {
			target1 = Y;
			target1_2 = X;
			target2 = A;
			dif = X - Y;
		}

		int cprice1 = C * target1 * 2 + dif * target2;
		int cprice2 = C * target1_2 * 2;
		int cprice = cprice1 > cprice2 ? cprice2 : cprice1;

		if (abprice > cprice) {
			System.out.println(cprice);
		} else {
			System.out.println(abprice);
		}

	}
}