//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{
			if(X>Y){
				printf("%d\n",Y*2*C+(X-Y)*A);
			}
			if(X<=Y){
				printf("%d\n",X*2*C+(Y-X)*B);
			}
		}
	}
} 