A, B, C, X, Y = map(int, input().split())
sum_1 = A * X + B * Y
num_c = 2 * min(X, Y)
sum_2 = C * num_c + A * (X - num_c / 2) + B * (Y - num_c / 2)
if sum_1 <= sum_2:
	print(int(sum_1))
else:
	print(int(sum_2))