import java.util.Scanner;

public class Main {
public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);
	int A,B,C,X,Y;
	A=sc.nextInt();
	B=sc.nextInt();
	C=sc.nextInt();
	X=sc.nextInt();
	Y=sc.nextInt();
	C*=2;
	if(C>=A+B) {
		System.out.println(A*X+B*Y);
	}else {
		int min=X>Y?Y:X;
		int result=0;
		result+=(min*C);
		if(X==Y) {
			System.out.println(result);
		}else if(X>Y) {
			int cha=X-Y;
			if(C<A) {
				result+=(C*cha);
				System.out.println(result);
			}else {
				result+=(A*cha);
				System.out.println(result);
			}
		}else if(X<Y) {
			int cha=Y-X;
			if(C<B) {
				result+=(C*cha);
				System.out.println(result);
			}else {
				result+=(B*cha);
				System.out.println(result);
			}
		}
	}
	
	
}
} import java.util.Scanner; Scanner java.util public class Main {
public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);
	int A,B,C,X,Y;
	A=sc.nextInt();
	B=sc.nextInt();
	C=sc.nextInt();
	X=sc.nextInt();
	Y=sc.nextInt();
	C*=2;
	if(C>=A+B) {
		System.out.println(A*X+B*Y);
	}else {
		int min=X>Y?Y:X;
		int result=0;
		result+=(min*C);
		if(X==Y) {
			System.out.println(result);
		}else if(X>Y) {
			int cha=X-Y;
			if(C<A) {
				result+=(C*cha);
				System.out.println(result);
			}else {
				result+=(A*cha);
				System.out.println(result);
			}
		}else if(X<Y) {
			int cha=Y-X;
			if(C<B) {
				result+=(C*cha);
				System.out.println(result);
			}else {
				result+=(B*cha);
				System.out.println(result);
			}
		}
	}
	
	
}
} Main public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);
	int A,B,C,X,Y;
	A=sc.nextInt();
	B=sc.nextInt();
	C=sc.nextInt();
	X=sc.nextInt();
	Y=sc.nextInt();
	C*=2;
	if(C>=A+B) {
		System.out.println(A*X+B*Y);
	}else {
		int min=X>Y?Y:X;
		int result=0;
		result+=(min*C);
		if(X==Y) {
			System.out.println(result);
		}else if(X>Y) {
			int cha=X-Y;
			if(C<A) {
				result+=(C*cha);
				System.out.println(result);
			}else {
				result+=(A*cha);
				System.out.println(result);
			}
		}else if(X<Y) {
			int cha=Y-X;
			if(C<B) {
				result+=(C*cha);
				System.out.println(result);
			}else {
				result+=(B*cha);
				System.out.println(result);
			}
		}
	}
	
	
} main {
	Scanner sc = new Scanner(System.in);
	int A,B,C,X,Y;
	A=sc.nextInt();
	B=sc.nextInt();
	C=sc.nextInt();
	X=sc.nextInt();
	Y=sc.nextInt();
	C*=2;
	if(C>=A+B) {
		System.out.println(A*X+B*Y);
	}else {
		int min=X>Y?Y:X;
		int result=0;
		result+=(min*C);
		if(X==Y) {
			System.out.println(result);
		}else if(X>Y) {
			int cha=X-Y;
			if(C<A) {
				result+=(C*cha);
				System.out.println(result);
			}else {
				result+=(A*cha);
				System.out.println(result);
			}
		}else if(X<Y) {
			int cha=Y-X;
			if(C<B) {
				result+=(C*cha);
				System.out.println(result);
			}else {
				result+=(B*cha);
				System.out.println(result);
			}
		}
	}
	
	
} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int A A B B C C X X Y; Y A=sc.nextInt() A sc.nextInt() sc.nextInt sc B=sc.nextInt() B sc.nextInt() sc.nextInt sc C=sc.nextInt() C sc.nextInt() sc.nextInt sc X=sc.nextInt() X sc.nextInt() sc.nextInt sc Y=sc.nextInt() Y sc.nextInt() sc.nextInt sc C*=2 C 2 if(C>=A+B) {
		System.out.println(A*X+B*Y);
	}else {
		int min=X>Y?Y:X;
		int result=0;
		result+=(min*C);
		if(X==Y) {
			System.out.println(result);
		}else if(X>Y) {
			int cha=X-Y;
			if(C<A) {
				result+=(C*cha);
				System.out.println(result);
			}else {
				result+=(A*cha);
				System.out.println(result);
			}
		}else if(X<Y) {
			int cha=Y-X;
			if(C<B) {
				result+=(C*cha);
				System.out.println(result);
			}else {
				result+=(B*cha);
				System.out.println(result);
			}
		}
	} C>=A+B C A+B A B {
		System.out.println(A*X+B*Y);
	} System.out.println(A*X+B*Y) System.out.println System.out System System.out A*X+B*Y A*X A X B*Y B Y {
		int min=X>Y?Y:X;
		int result=0;
		result+=(min*C);
		if(X==Y) {
			System.out.println(result);
		}else if(X>Y) {
			int cha=X-Y;
			if(C<A) {
				result+=(C*cha);
				System.out.println(result);
			}else {
				result+=(A*cha);
				System.out.println(result);
			}
		}else if(X<Y) {
			int cha=Y-X;
			if(C<B) {
				result+=(C*cha);
				System.out.println(result);
			}else {
				result+=(B*cha);
				System.out.println(result);
			}
		}
	} int min=X>Y?Y:X; min X>Y?Y:X X>Y X Y Y X int result=0; result 0 result+=(min*C) result (min*C) min C if(X==Y) {
			System.out.println(result);
		}else if(X>Y) {
			int cha=X-Y;
			if(C<A) {
				result+=(C*cha);
				System.out.println(result);
			}else {
				result+=(A*cha);
				System.out.println(result);
			}
		}else if(X<Y) {
			int cha=Y-X;
			if(C<B) {
				result+=(C*cha);
				System.out.println(result);
			}else {
				result+=(B*cha);
				System.out.println(result);
			}
		} X==Y X Y {
			System.out.println(result);
		} System.out.println(result) System.out.println System.out System System.out result if(X>Y) {
			int cha=X-Y;
			if(C<A) {
				result+=(C*cha);
				System.out.println(result);
			}else {
				result+=(A*cha);
				System.out.println(result);
			}
		}else if(X<Y) {
			int cha=Y-X;
			if(C<B) {
				result+=(C*cha);
				System.out.println(result);
			}else {
				result+=(B*cha);
				System.out.println(result);
			}
		} X>Y X Y {
			int cha=X-Y;
			if(C<A) {
				result+=(C*cha);
				System.out.println(result);
			}else {
				result+=(A*cha);
				System.out.println(result);
			}
		} int cha=X-Y; cha X-Y X Y if(C<A) {
				result+=(C*cha);
				System.out.println(result);
			}else {
				result+=(A*cha);
				System.out.println(result);
			} C<A C A {
				result+=(C*cha);
				System.out.println(result);
			} result+=(C*cha) result (C*cha) C cha System.out.println(result) System.out.println System.out System System.out result {
				result+=(A*cha);
				System.out.println(result);
			} result+=(A*cha) result (A*cha) A cha System.out.println(result) System.out.println System.out System System.out result if(X<Y) {
			int cha=Y-X;
			if(C<B) {
				result+=(C*cha);
				System.out.println(result);
			}else {
				result+=(B*cha);
				System.out.println(result);
			}
		} X<Y X Y {
			int cha=Y-X;
			if(C<B) {
				result+=(C*cha);
				System.out.println(result);
			}else {
				result+=(B*cha);
				System.out.println(result);
			}
		} int cha=Y-X; cha Y-X Y X if(C<B) {
				result+=(C*cha);
				System.out.println(result);
			}else {
				result+=(B*cha);
				System.out.println(result);
			} C<B C B {
				result+=(C*cha);
				System.out.println(result);
			} result+=(C*cha) result (C*cha) C cha System.out.println(result) System.out.println System.out System System.out result {
				result+=(B*cha);
				System.out.println(result);
			} result+=(B*cha) result (B*cha) B cha System.out.println(result) System.out.println System.out System System.out result String[] args args public class Main {
public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);
	int A,B,C,X,Y;
	A=sc.nextInt();
	B=sc.nextInt();
	C=sc.nextInt();
	X=sc.nextInt();
	Y=sc.nextInt();
	C*=2;
	if(C>=A+B) {
		System.out.println(A*X+B*Y);
	}else {
		int min=X>Y?Y:X;
		int result=0;
		result+=(min*C);
		if(X==Y) {
			System.out.println(result);
		}else if(X>Y) {
			int cha=X-Y;
			if(C<A) {
				result+=(C*cha);
				System.out.println(result);
			}else {
				result+=(A*cha);
				System.out.println(result);
			}
		}else if(X<Y) {
			int cha=Y-X;
			if(C<B) {
				result+=(C*cha);
				System.out.println(result);
			}else {
				result+=(B*cha);
				System.out.println(result);
			}
		}
	}
	
	
}
} public class Main {
public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);
	int A,B,C,X,Y;
	A=sc.nextInt();
	B=sc.nextInt();
	C=sc.nextInt();
	X=sc.nextInt();
	Y=sc.nextInt();
	C*=2;
	if(C>=A+B) {
		System.out.println(A*X+B*Y);
	}else {
		int min=X>Y?Y:X;
		int result=0;
		result+=(min*C);
		if(X==Y) {
			System.out.println(result);
		}else if(X>Y) {
			int cha=X-Y;
			if(C<A) {
				result+=(C*cha);
				System.out.println(result);
			}else {
				result+=(A*cha);
				System.out.println(result);
			}
		}else if(X<Y) {
			int cha=Y-X;
			if(C<B) {
				result+=(C*cha);
				System.out.println(result);
			}else {
				result+=(B*cha);
				System.out.println(result);
			}
		}
	}
	
	
}
} Main
import java.util.Scanner;

public class Main {
public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);
	int A,B,C,X,Y;
	A=sc.nextInt();
	B=sc.nextInt();
	C=sc.nextInt();
	X=sc.nextInt();
	Y=sc.nextInt();
	C*=2;
	if(C>=A+B) {
		System.out.println(A*X+B*Y);
	}else {
		int min=X>Y?Y:X;
		int result=0;
		result+=(min*C);
		if(X==Y) {
			System.out.println(result);
		}else if(X>Y) {
			int cha=X-Y;
			if(C<A) {
				result+=(C*cha);
				System.out.println(result);
			}else {
				result+=(A*cha);
				System.out.println(result);
			}
		}else if(X<Y) {
			int cha=Y-X;
			if(C<B) {
				result+=(C*cha);
				System.out.println(result);
			}else {
				result+=(B*cha);
				System.out.println(result);
			}
		}
	}
	
	
}
}
