A,B,C,X,Y = map(int,raw_input().split())
if C <= A & B :#
	x = max(X,Y) * 2 * C#
	y = 0
elif (C * 2) <= (A + B) and X > Y :
	x = min(X,Y) * 2 * C
	y = (X - Y) * A
elif (C * 2) <= (A + B) and Y > X :
	x = min(X,Y) * 2 * C
	y = (Y - X) * B
else :
	y = (X * A) + (Y * B)
	x = 0
print x+y