import 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 minN = X;
	int many = B;
	if(Y<X) {
	    minN = Y;
	    many = A;
	}

	int a = A*X + B*Y;
	int b = C*2*minN+(int)(Math.abs(X-Y))*many;
	int c = C*2*Math.max(X,Y);
	int result = Math.min(a,b);
	result = Math.min(result,c);
	System.out.println(result);
    }
} import java.util.*; util.* java 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 minN = X;
	int many = B;
	if(Y<X) {
	    minN = Y;
	    many = A;
	}

	int a = A*X + B*Y;
	int b = C*2*minN+(int)(Math.abs(X-Y))*many;
	int c = C*2*Math.max(X,Y);
	int result = Math.min(a,b);
	result = Math.min(result,c);
	System.out.println(result);
    }
} 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 minN = X;
	int many = B;
	if(Y<X) {
	    minN = Y;
	    many = A;
	}

	int a = A*X + B*Y;
	int b = C*2*minN+(int)(Math.abs(X-Y))*many;
	int c = C*2*Math.max(X,Y);
	int result = Math.min(a,b);
	result = Math.min(result,c);
	System.out.println(result);
    } 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 minN = X;
	int many = B;
	if(Y<X) {
	    minN = Y;
	    many = A;
	}

	int a = A*X + B*Y;
	int b = C*2*minN+(int)(Math.abs(X-Y))*many;
	int c = C*2*Math.max(X,Y);
	int result = Math.min(a,b);
	result = Math.min(result,c);
	System.out.println(result);
    } 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 minN = X; minN X int many = B; many B if(Y<X) {
	    minN = Y;
	    many = A;
	} Y<X Y X {
	    minN = Y;
	    many = A;
	} minN = Y minN Y many = A many A int a = A*X + B*Y; a A*X + B*Y A*X A X B*Y B Y int b = C*2*minN+(int)(Math.abs(X-Y))*many; b C*2*minN+(int)(Math.abs(X-Y))*many C*2*minN C*2*minN C 2 minN (int)(Math.abs(X-Y))*many (int)(Math.abs(X-Y)) Math.abs Math X-Y X Y many int c = C*2*Math.max(X,Y); c C*2*Math.max(X,Y) C*2*Math.max(X,Y) C 2 Math.max(X,Y) Math.max Math X Y int result = Math.min(a,b); result Math.min(a,b) Math.min Math a b result = Math.min(result,c) result Math.min(result,c) Math.min Math result c System.out.println(result) System.out.println System.out System System.out result String[] args args
import 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 minN = X;
	int many = B;
	if(Y<X) {
	    minN = Y;
	    many = A;
	}

	int a = A*X + B*Y;
	int b = C*2*minN+(int)(Math.abs(X-Y))*many;
	int c = C*2*Math.max(X,Y);
	int result = Math.min(a,b);
	result = Math.min(result,c);
	System.out.println(result);
    }
}