import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scn = new Scanner(System.in);
		long A = scn.nextLong();
		long B = scn.nextLong();
		long C = scn.nextLong();
		long X = scn.nextLong();
		long Y = scn.nextLong();
		long ans = Long.MAX_VALUE;
		for(long i = 0;i <= Math.max(X, Y);i++) {
			ans = Math.min(ans, A * Math.max(0,X-i) + B * Math.max(0,(Y-i)) + C * 2 * i);
		}
		System.out.println(ans);
	}

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

	public static void main(String[] args) {
		Scanner scn = new Scanner(System.in);
		long A = scn.nextLong();
		long B = scn.nextLong();
		long C = scn.nextLong();
		long X = scn.nextLong();
		long Y = scn.nextLong();
		long ans = Long.MAX_VALUE;
		for(long i = 0;i <= Math.max(X, Y);i++) {
			ans = Math.min(ans, A * Math.max(0,X-i) + B * Math.max(0,(Y-i)) + C * 2 * i);
		}
		System.out.println(ans);
	}

} Main public static void main(String[] args) {
		Scanner scn = new Scanner(System.in);
		long A = scn.nextLong();
		long B = scn.nextLong();
		long C = scn.nextLong();
		long X = scn.nextLong();
		long Y = scn.nextLong();
		long ans = Long.MAX_VALUE;
		for(long i = 0;i <= Math.max(X, Y);i++) {
			ans = Math.min(ans, A * Math.max(0,X-i) + B * Math.max(0,(Y-i)) + C * 2 * i);
		}
		System.out.println(ans);
	} main {
		Scanner scn = new Scanner(System.in);
		long A = scn.nextLong();
		long B = scn.nextLong();
		long C = scn.nextLong();
		long X = scn.nextLong();
		long Y = scn.nextLong();
		long ans = Long.MAX_VALUE;
		for(long i = 0;i <= Math.max(X, Y);i++) {
			ans = Math.min(ans, A * Math.max(0,X-i) + B * Math.max(0,(Y-i)) + C * 2 * i);
		}
		System.out.println(ans);
	} Scanner scn = new Scanner(System.in); scn new Scanner(System.in) long A = scn.nextLong(); A scn.nextLong() scn.nextLong scn long B = scn.nextLong(); B scn.nextLong() scn.nextLong scn long C = scn.nextLong(); C scn.nextLong() scn.nextLong scn long X = scn.nextLong(); X scn.nextLong() scn.nextLong scn long Y = scn.nextLong(); Y scn.nextLong() scn.nextLong scn long ans = Long.MAX_VALUE; ans Long.MAX_VALUE Long Long.MAX_VALUE for(long i = 0;i <= Math.max(X, Y);i++) {
			ans = Math.min(ans, A * Math.max(0,X-i) + B * Math.max(0,(Y-i)) + C * 2 * i);
		} long i = 0; long i = 0; i 0 i <= Math.max(X, Y) i Math.max(X, Y) Math.max Math X Y i++ i++ i {
			ans = Math.min(ans, A * Math.max(0,X-i) + B * Math.max(0,(Y-i)) + C * 2 * i);
		} {
			ans = Math.min(ans, A * Math.max(0,X-i) + B * Math.max(0,(Y-i)) + C * 2 * i);
		} ans = Math.min(ans, A * Math.max(0,X-i) + B * Math.max(0,(Y-i)) + C * 2 * i) ans Math.min(ans, A * Math.max(0,X-i) + B * Math.max(0,(Y-i)) + C * 2 * i) Math.min Math ans A * Math.max(0,X-i) + B * Math.max(0,(Y-i)) + C * 2 * i A * Math.max(0,X-i) + B * Math.max(0,(Y-i)) + C * 2 * i A * Math.max(0,X-i) A Math.max(0,X-i) Math.max Math 0 X-i X i B * Math.max(0,(Y-i)) B Math.max(0,(Y-i)) Math.max Math 0 (Y-i) Y i C * 2 * i C * 2 * i C 2 i 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 scn = new Scanner(System.in);
		long A = scn.nextLong();
		long B = scn.nextLong();
		long C = scn.nextLong();
		long X = scn.nextLong();
		long Y = scn.nextLong();
		long ans = Long.MAX_VALUE;
		for(long i = 0;i <= Math.max(X, Y);i++) {
			ans = Math.min(ans, A * Math.max(0,X-i) + B * Math.max(0,(Y-i)) + C * 2 * i);
		}
		System.out.println(ans);
	}

} public class Main {

	public static void main(String[] args) {
		Scanner scn = new Scanner(System.in);
		long A = scn.nextLong();
		long B = scn.nextLong();
		long C = scn.nextLong();
		long X = scn.nextLong();
		long Y = scn.nextLong();
		long ans = Long.MAX_VALUE;
		for(long i = 0;i <= Math.max(X, Y);i++) {
			ans = Math.min(ans, A * Math.max(0,X-i) + B * Math.max(0,(Y-i)) + C * 2 * i);
		}
		System.out.println(ans);
	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scn = new Scanner(System.in);
		long A = scn.nextLong();
		long B = scn.nextLong();
		long C = scn.nextLong();
		long X = scn.nextLong();
		long Y = scn.nextLong();
		long ans = Long.MAX_VALUE;
		for(long i = 0;i <= Math.max(X, Y);i++) {
			ans = Math.min(ans, A * Math.max(0,X-i) + B * Math.max(0,(Y-i)) + C * 2 * i);
		}
		System.out.println(ans);
	}

}
