#include<stdio.h>
int main()
{
	int A,B,C,X,Y;
	while(1)
	{
		scanf("%d %d %d %d %d",&A,&B,&C,&X,&Y);
		if(A>=1&&B>=1&&C>=1&&A<=5000&&B<=5000&&C<=5000&&X>=1&&Y>=1&&X<=10^5&&Y<=10^5)
		{
			break;
		}
	
	}	
	int x=0,y=0;
	if((A+B)>2*C)
	{
		if(X>=Y)
		{
			if(X>=2*C)//买AB
			{
			x=2*(X-Y)*C;		
			}
			else
			{
		    x=(X-Y)*A;
			}
	
		y=Y*2*C;	
		}
		
		else 
		{
			if(Y>=2*C)//买AB
			{
			x=2*(Y-X)*C;		
			}
			else
			{
		    x=(Y-X)*B;
			}
		y=X*2*C;
		}
		printf("%d",x+y);
	}
	else if((A+B)<2*C)
	{
		x=X*A;
		y=Y*B;
		printf("%d",x+y);
	}	
	else
	{
	  if(X>Y)
	  {
	 	x=(X-Y)*A;
	 	y=Y*2*C;
	  } 
	  if(X<Y)
	  {
	 	x=(Y-X)*A;
	 	y=X*2*C;
	  } 
	  if(X==Y)
	  {
	 	x=X*A;
	 	y=Y*B;
	  } 
	printf("%d",x+y);
		
    }
	return 0;
}