import java.util.*;

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

	public void execute() {
		Scanner sc = new Scanner(System.in);
		final int A = sc.nextInt();
		final int B = sc.nextInt();
		final int C = sc.nextInt();

		final int X = sc.nextInt();
		final int Y = sc.nextInt();

		long minCost = Long.MAX_VALUE;

		for (int i = 0, bound = Math.max(X, Y) * 2; i <= bound; i += 2) {
			long ab = i;
			long a = Math.max(X - i / 2, 0);
			long b = Math.max(Y - i / 2, 0);
			long cost = A * a + B * b + C * ab;
			minCost = Math.min(minCost, cost);
		}
		System.out.println(minCost);
		sc.close();

	}

} import java.util.*; util.* java public class Main {
	public static void main(String[] args) {
		new Main().execute();
	}

	public void execute() {
		Scanner sc = new Scanner(System.in);
		final int A = sc.nextInt();
		final int B = sc.nextInt();
		final int C = sc.nextInt();

		final int X = sc.nextInt();
		final int Y = sc.nextInt();

		long minCost = Long.MAX_VALUE;

		for (int i = 0, bound = Math.max(X, Y) * 2; i <= bound; i += 2) {
			long ab = i;
			long a = Math.max(X - i / 2, 0);
			long b = Math.max(Y - i / 2, 0);
			long cost = A * a + B * b + C * ab;
			minCost = Math.min(minCost, cost);
		}
		System.out.println(minCost);
		sc.close();

	}

} Main public static void main(String[] args) {
		new Main().execute();
	} main {
		new Main().execute();
	} new Main().execute() new Main().execute new Main() String[] args args public void execute() {
		Scanner sc = new Scanner(System.in);
		final int A = sc.nextInt();
		final int B = sc.nextInt();
		final int C = sc.nextInt();

		final int X = sc.nextInt();
		final int Y = sc.nextInt();

		long minCost = Long.MAX_VALUE;

		for (int i = 0, bound = Math.max(X, Y) * 2; i <= bound; i += 2) {
			long ab = i;
			long a = Math.max(X - i / 2, 0);
			long b = Math.max(Y - i / 2, 0);
			long cost = A * a + B * b + C * ab;
			minCost = Math.min(minCost, cost);
		}
		System.out.println(minCost);
		sc.close();

	} execute {
		Scanner sc = new Scanner(System.in);
		final int A = sc.nextInt();
		final int B = sc.nextInt();
		final int C = sc.nextInt();

		final int X = sc.nextInt();
		final int Y = sc.nextInt();

		long minCost = Long.MAX_VALUE;

		for (int i = 0, bound = Math.max(X, Y) * 2; i <= bound; i += 2) {
			long ab = i;
			long a = Math.max(X - i / 2, 0);
			long b = Math.max(Y - i / 2, 0);
			long cost = A * a + B * b + C * ab;
			minCost = Math.min(minCost, cost);
		}
		System.out.println(minCost);
		sc.close();

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) final int A = sc.nextInt(); A sc.nextInt() sc.nextInt sc final int B = sc.nextInt(); B sc.nextInt() sc.nextInt sc final int C = sc.nextInt(); C sc.nextInt() sc.nextInt sc final int X = sc.nextInt(); X sc.nextInt() sc.nextInt sc final int Y = sc.nextInt(); Y sc.nextInt() sc.nextInt sc long minCost = Long.MAX_VALUE; minCost Long.MAX_VALUE Long Long.MAX_VALUE for (int i = 0, bound = Math.max(X, Y) * 2; i <= bound; i += 2) {
			long ab = i;
			long a = Math.max(X - i / 2, 0);
			long b = Math.max(Y - i / 2, 0);
			long cost = A * a + B * b + C * ab;
			minCost = Math.min(minCost, cost);
		} int i = 0, bound = Math.max(X, Y) * 2; int i = 0 i 0 bound = Math.max(X, Y) * 2; bound Math.max(X, Y) * 2 Math.max(X, Y) Math.max Math X Y 2 i <= bound i bound i += 2 i += 2 i 2 {
			long ab = i;
			long a = Math.max(X - i / 2, 0);
			long b = Math.max(Y - i / 2, 0);
			long cost = A * a + B * b + C * ab;
			minCost = Math.min(minCost, cost);
		} {
			long ab = i;
			long a = Math.max(X - i / 2, 0);
			long b = Math.max(Y - i / 2, 0);
			long cost = A * a + B * b + C * ab;
			minCost = Math.min(minCost, cost);
		} long ab = i; ab i long a = Math.max(X - i / 2, 0); a Math.max(X - i / 2, 0) Math.max Math X - i / 2 X i / 2 i 2 0 long b = Math.max(Y - i / 2, 0); b Math.max(Y - i / 2, 0) Math.max Math Y - i / 2 Y i / 2 i 2 0 long cost = A * a + B * b + C * ab; cost A * a + B * b + C * ab A * a + B * b + C * ab A * a A a B * b B b C * ab C ab minCost = Math.min(minCost, cost) minCost Math.min(minCost, cost) Math.min Math minCost cost System.out.println(minCost) System.out.println System.out System System.out minCost sc.close() sc.close sc public class Main {
	public static void main(String[] args) {
		new Main().execute();
	}

	public void execute() {
		Scanner sc = new Scanner(System.in);
		final int A = sc.nextInt();
		final int B = sc.nextInt();
		final int C = sc.nextInt();

		final int X = sc.nextInt();
		final int Y = sc.nextInt();

		long minCost = Long.MAX_VALUE;

		for (int i = 0, bound = Math.max(X, Y) * 2; i <= bound; i += 2) {
			long ab = i;
			long a = Math.max(X - i / 2, 0);
			long b = Math.max(Y - i / 2, 0);
			long cost = A * a + B * b + C * ab;
			minCost = Math.min(minCost, cost);
		}
		System.out.println(minCost);
		sc.close();

	}

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

	public void execute() {
		Scanner sc = new Scanner(System.in);
		final int A = sc.nextInt();
		final int B = sc.nextInt();
		final int C = sc.nextInt();

		final int X = sc.nextInt();
		final int Y = sc.nextInt();

		long minCost = Long.MAX_VALUE;

		for (int i = 0, bound = Math.max(X, Y) * 2; i <= bound; i += 2) {
			long ab = i;
			long a = Math.max(X - i / 2, 0);
			long b = Math.max(Y - i / 2, 0);
			long cost = A * a + B * b + C * ab;
			minCost = Math.min(minCost, cost);
		}
		System.out.println(minCost);
		sc.close();

	}

} Main
import java.util.*;

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

	public void execute() {
		Scanner sc = new Scanner(System.in);
		final int A = sc.nextInt();
		final int B = sc.nextInt();
		final int C = sc.nextInt();

		final int X = sc.nextInt();
		final int Y = sc.nextInt();

		long minCost = Long.MAX_VALUE;

		for (int i = 0, bound = Math.max(X, Y) * 2; i <= bound; i += 2) {
			long ab = i;
			long a = Math.max(X - i / 2, 0);
			long b = Math.max(Y - i / 2, 0);
			long cost = A * a + B * b + C * ab;
			minCost = Math.min(minCost, cost);
		}
		System.out.println(minCost);
		sc.close();

	}

}
