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

price = 0

if X > Y:
    small = Y
    ler = X
    rest = X - Y
    rest_pri = A
else:
    small = X
    ler = Y
    rest = Y - X
    rest_pri = B

if A >= 2 * C:
    price_1 = (C * 2) * ler
    price_2 = (C * 2) * X
    if X < Y:
        price_2 += B * (Y - X)
    if price_1 < price_2:
        price = price_1
elif B >= 2 * C:
    price_1 = (C * 2) * ler
    price_2 = (C * 2) * Y
    if Y < X:
        price_2 += A * (X - Y)
    if price_1 < price_2:
        price = price_1

elif A + B > 2 * C:
    price += (C * 2) * small
    price += rest_pri * rest
else:
    price += A * X + B * Y

print(price)
