import java.util.Scanner;
public 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 price = 0;
		price += Math.min(2*C, A+B) * Math.min(X, Y);
		if(X>Y) {
			price += (X-Y)*A;
		}else {
			price += (Y-X)*B;
		}

		int AB = Math.max(X, Y)*2*C;

		System.out.println(Math.min(price, AB));

	}

} import java.util.Scanner; Scanner java.util public 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 price = 0;
		price += Math.min(2*C, A+B) * Math.min(X, Y);
		if(X>Y) {
			price += (X-Y)*A;
		}else {
			price += (Y-X)*B;
		}

		int AB = Math.max(X, Y)*2*C;

		System.out.println(Math.min(price, AB));

	}

} 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 price = 0;
		price += Math.min(2*C, A+B) * Math.min(X, Y);
		if(X>Y) {
			price += (X-Y)*A;
		}else {
			price += (Y-X)*B;
		}

		int AB = Math.max(X, Y)*2*C;

		System.out.println(Math.min(price, AB));

	} 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 price = 0;
		price += Math.min(2*C, A+B) * Math.min(X, Y);
		if(X>Y) {
			price += (X-Y)*A;
		}else {
			price += (Y-X)*B;
		}

		int AB = Math.max(X, Y)*2*C;

		System.out.println(Math.min(price, AB));

	} 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 price = 0; price 0 price += Math.min(2*C, A+B) * Math.min(X, Y) price Math.min(2*C, A+B) * Math.min(X, Y) Math.min(2*C, A+B) Math.min Math 2*C 2 C A+B A B Math.min(X, Y) Math.min Math X Y if(X>Y) {
			price += (X-Y)*A;
		}else {
			price += (Y-X)*B;
		} X>Y X Y {
			price += (X-Y)*A;
		} price += (X-Y)*A price (X-Y)*A (X-Y) X Y A {
			price += (Y-X)*B;
		} price += (Y-X)*B price (Y-X)*B (Y-X) Y X B int AB = Math.max(X, Y)*2*C; AB Math.max(X, Y)*2*C Math.max(X, Y)*2*C Math.max(X, Y) Math.max Math X Y 2 C System.out.println(Math.min(price, AB)) System.out.println System.out System System.out Math.min(price, AB) Math.min Math price AB String[] args args public 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 price = 0;
		price += Math.min(2*C, A+B) * Math.min(X, Y);
		if(X>Y) {
			price += (X-Y)*A;
		}else {
			price += (Y-X)*B;
		}

		int AB = Math.max(X, Y)*2*C;

		System.out.println(Math.min(price, AB));

	}

} public 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 price = 0;
		price += Math.min(2*C, A+B) * Math.min(X, Y);
		if(X>Y) {
			price += (X-Y)*A;
		}else {
			price += (Y-X)*B;
		}

		int AB = Math.max(X, Y)*2*C;

		System.out.println(Math.min(price, AB));

	}

} Main
import java.util.Scanner;
public 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 price = 0;
		price += Math.min(2*C, A+B) * Math.min(X, Y);
		if(X>Y) {
			price += (X-Y)*A;
		}else {
			price += (Y-X)*B;
		}

		int AB = Math.max(X, Y)*2*C;

		System.out.println(Math.min(price, AB));

	}

}
