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 or B >= 2 * C:
    price += (C * 2) * ler
elif A + B > 2 * C:
    price += (C * 2) * small
    price += rest_pri * rest
else:
    price += A * X + B * Y

print(price)
