A, B, C, X, Y = map(int, input().split())

all_single = A * X + B * Y

all_Half = max(X, Y) * 2 * C

if (X - Y) >= 0:
    use_withHalf = C * Y * 2 + (A * (X - Y))
else:
    use_withHalf = C * X * 2 + (A * (Y - X))

# print(all_single)
# print(use_withHalf)
# print(all_Half)
# print("------")
print(min(all_single, use_withHalf, all_Half))