//96a
#include<stdio.h>
int main(){
	int X,Y,A,B,C;
	while(~scanf("%d%d%d%d%d",&A,&B,&C,&X,&Y)){
		if((A+B)/2<C){
			printf("%d\n",A*X+B*Y);
		}
		else{
			int m;
			if(X>Y){
				if(X*2*C<Y*2*C+(X-Y)*A){
				m=X*2*C;
			}
			else	
				m=Y*2*C+(X-Y)*A;
			}
			if(X<=Y){
				if(Y*2*C<X*2*C+(Y-X)*B){
				m=Y*2*C;}
			else
				m=X*2*C+(Y-X)*B;
			}
			printf("%d",m);
		}
	}
} 