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

total_price=0
C2=C*2

if C2<=A and C2<=B:
    total_price=C2*max(X,Y)

elif C2<=A and C2>=B:
    if X>=Y:
        total_price=C2*Y
        X=X-Y
        Y=0
        total_price=total_price+A*X
    else:
        total_price=C2*X
        X=0
        Y=Y-X
        total_price=total_price+B*Y
        
elif (C2>=A and C2<=B) or (C2<=A and C2>=B) :
    total_price=C2*min(X,Y)
    total_price=total_price+min(A,B)*(max(X,Y)-min(X,Y))        
    

elif C2<(A+B):  #C2<=(A+B): 
    if X>=Y:
        total_price=C2*Y
        X=X-Y
        Y=0
        total_price=total_price+A*X
    else:
        total_price=C2*X
        X=0
        Y=Y-X
        total_price=total_price+B*Y
        
else:
    total_price=A*X+B*Y
print(total_price)
