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

MIN = None
for i in range(100001):
    price = 2*C*i + A*max(0,X-i) + B*min(0,Y-i)
    if MIN is None:
        MIN = price
    MIN = min(MIN, price)

print(MIN)
