import java.io.InputStream;
import java.io.PrintStream;
import java.util.Scanner;

public class Main {
	InputStream in = System.in;
	PrintStream out = System.out;

	public void _main(String[] args) {
		Scanner sc = new Scanner(in);

		int A = sc.nextInt();
		int B = sc.nextInt();
		int C = sc.nextInt();
		int X = sc.nextInt();
		int Y = sc.nextInt();

		int ans = Integer.MAX_VALUE;

		for (int ab = 0; ab <= Math.max(X * 2, Y * 2); ab++) {
			int a = Math.max(0, X - (ab / 2));
			int b = Math.max(0, Y - (ab / 2));
			ans = Math.min(ans, a * A + b * B + ab * C);
		}

		out.println(ans);

		sc.close();

	}

	public static void main(String[] args) {
		new Main()._main(args);
	}

} import java.io.InputStream; InputStream java.io import java.io.PrintStream; PrintStream java.io import java.util.Scanner; Scanner java.util public class Main {
	InputStream in = System.in;
	PrintStream out = System.out;

	public void _main(String[] args) {
		Scanner sc = new Scanner(in);

		int A = sc.nextInt();
		int B = sc.nextInt();
		int C = sc.nextInt();
		int X = sc.nextInt();
		int Y = sc.nextInt();

		int ans = Integer.MAX_VALUE;

		for (int ab = 0; ab <= Math.max(X * 2, Y * 2); ab++) {
			int a = Math.max(0, X - (ab / 2));
			int b = Math.max(0, Y - (ab / 2));
			ans = Math.min(ans, a * A + b * B + ab * C);
		}

		out.println(ans);

		sc.close();

	}

	public static void main(String[] args) {
		new Main()._main(args);
	}

} Main InputStream in = System.in; in System.in System System.in PrintStream out = System.out; out System.out System System.out public void _main(String[] args) {
		Scanner sc = new Scanner(in);

		int A = sc.nextInt();
		int B = sc.nextInt();
		int C = sc.nextInt();
		int X = sc.nextInt();
		int Y = sc.nextInt();

		int ans = Integer.MAX_VALUE;

		for (int ab = 0; ab <= Math.max(X * 2, Y * 2); ab++) {
			int a = Math.max(0, X - (ab / 2));
			int b = Math.max(0, Y - (ab / 2));
			ans = Math.min(ans, a * A + b * B + ab * C);
		}

		out.println(ans);

		sc.close();

	} _main {
		Scanner sc = new Scanner(in);

		int A = sc.nextInt();
		int B = sc.nextInt();
		int C = sc.nextInt();
		int X = sc.nextInt();
		int Y = sc.nextInt();

		int ans = Integer.MAX_VALUE;

		for (int ab = 0; ab <= Math.max(X * 2, Y * 2); ab++) {
			int a = Math.max(0, X - (ab / 2));
			int b = Math.max(0, Y - (ab / 2));
			ans = Math.min(ans, a * A + b * B + ab * C);
		}

		out.println(ans);

		sc.close();

	} Scanner sc = new Scanner(in); sc new Scanner(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 ans = Integer.MAX_VALUE; ans Integer.MAX_VALUE Integer Integer.MAX_VALUE for (int ab = 0; ab <= Math.max(X * 2, Y * 2); ab++) {
			int a = Math.max(0, X - (ab / 2));
			int b = Math.max(0, Y - (ab / 2));
			ans = Math.min(ans, a * A + b * B + ab * C);
		} int ab = 0; int ab = 0; ab 0 ab <= Math.max(X * 2, Y * 2) ab Math.max(X * 2, Y * 2) Math.max Math X * 2 X 2 Y * 2 Y 2 ab++ ab++ ab {
			int a = Math.max(0, X - (ab / 2));
			int b = Math.max(0, Y - (ab / 2));
			ans = Math.min(ans, a * A + b * B + ab * C);
		} {
			int a = Math.max(0, X - (ab / 2));
			int b = Math.max(0, Y - (ab / 2));
			ans = Math.min(ans, a * A + b * B + ab * C);
		} int a = Math.max(0, X - (ab / 2)); a Math.max(0, X - (ab / 2)) Math.max Math 0 X - (ab / 2) X (ab / 2) ab 2 int b = Math.max(0, Y - (ab / 2)); b Math.max(0, Y - (ab / 2)) Math.max Math 0 Y - (ab / 2) Y (ab / 2) ab 2 ans = Math.min(ans, a * A + b * B + ab * C) ans Math.min(ans, a * A + b * B + ab * C) Math.min Math ans a * A + b * B + ab * C a * A + b * B + ab * C a * A a A b * B b B ab * C ab C out.println(ans) out.println out ans sc.close() sc.close sc String[] args args public static void main(String[] args) {
		new Main()._main(args);
	} main {
		new Main()._main(args);
	} new Main()._main(args) new Main()._main new Main() args String[] args args public class Main {
	InputStream in = System.in;
	PrintStream out = System.out;

	public void _main(String[] args) {
		Scanner sc = new Scanner(in);

		int A = sc.nextInt();
		int B = sc.nextInt();
		int C = sc.nextInt();
		int X = sc.nextInt();
		int Y = sc.nextInt();

		int ans = Integer.MAX_VALUE;

		for (int ab = 0; ab <= Math.max(X * 2, Y * 2); ab++) {
			int a = Math.max(0, X - (ab / 2));
			int b = Math.max(0, Y - (ab / 2));
			ans = Math.min(ans, a * A + b * B + ab * C);
		}

		out.println(ans);

		sc.close();

	}

	public static void main(String[] args) {
		new Main()._main(args);
	}

} public class Main {
	InputStream in = System.in;
	PrintStream out = System.out;

	public void _main(String[] args) {
		Scanner sc = new Scanner(in);

		int A = sc.nextInt();
		int B = sc.nextInt();
		int C = sc.nextInt();
		int X = sc.nextInt();
		int Y = sc.nextInt();

		int ans = Integer.MAX_VALUE;

		for (int ab = 0; ab <= Math.max(X * 2, Y * 2); ab++) {
			int a = Math.max(0, X - (ab / 2));
			int b = Math.max(0, Y - (ab / 2));
			ans = Math.min(ans, a * A + b * B + ab * C);
		}

		out.println(ans);

		sc.close();

	}

	public static void main(String[] args) {
		new Main()._main(args);
	}

} Main
import java.io.InputStream;
import java.io.PrintStream;
import java.util.Scanner;

public class Main {
	InputStream in = System.in;
	PrintStream out = System.out;

	public void _main(String[] args) {
		Scanner sc = new Scanner(in);

		int A = sc.nextInt();
		int B = sc.nextInt();
		int C = sc.nextInt();
		int X = sc.nextInt();
		int Y = sc.nextInt();

		int ans = Integer.MAX_VALUE;

		for (int ab = 0; ab <= Math.max(X * 2, Y * 2); ab++) {
			int a = Math.max(0, X - (ab / 2));
			int b = Math.max(0, Y - (ab / 2));
			ans = Math.min(ans, a * A + b * B + ab * C);
		}

		out.println(ans);

		sc.close();

	}

	public static void main(String[] args) {
		new Main()._main(args);
	}

}
