A,B,C,X,Y=map(int,input().split())
price=[A,B,C]
money = 0
if A>2*C and B>2*C:
    money = C*max([X,Y])*2
#    money = price[[X,Y].index(max([X,Y]))]*max([X,Y])
elif A+B>2*C:
    money += C*min(X,Y)*2#A,Bのピザがそれぞれmin(X,Y)個できる
    if X>Y:
        money += (X-Y)*A
    else:
        money += (Y-X)*B
else:
    money += A*X+B*Y
print(money)
