#include<stdio.h>
void main()
{
	int A, B, C, X, Y,sum;
	
	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 <= 1e5 && Y < 1e5)
			break;
	}

	if (X >= Y)
	{
		if ((A*X + B*Y) >= (2 * Y*C + (X - Y)*A))
			sum = (2 * Y*C + (X - Y)*A);
		else
			sum = A*X + B*Y;
	}
	else
	{
		if ((A*X + B*Y) >= (2 * Y*C + B*(Y - X)))
			sum = (2 * Y*C + B*(Y - X));
		else
			sum = A*X + B*Y;
	}
	printf("%d\n", sum);
	

}