#include <stdio.h>
#define MIN(x,y) x<y?x:y

int main(){
	long int A,B,C,X,Y;
	scanf("%ld %ld %ld %ld %ld",&A,&B,&C,&X,&Y);
	long int ans=MIN(X, Y)*MIN(2C, A+B)+A*(X-MIN(X,Y))+B*(Y-MIN(X,Y)));
	printf("%ld",ans);
	return 0;
}