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

sum = 0

if ( (A > 2*C) and (B > 2*C) ):
    sum = 2*C*max([X,Y])

elif(A > 2*C):
    if (A+B > 2*C):
        sum = min([X,Y])*2*C
        if(X<Y):
            sum = sum + (Y-X)*B
        else:
            sum = sum + (X-Y)*A
    elif(Y<X):
        sum = 2*C*X+B*(Y-X)
    else:
        sum = 2*C*X

elif(B > 2*C):
    if (A+B > 2*C):
        sum = min([X,Y])*2*C
        if(X<Y):
            sum = sum + (Y-X)*B
        else:
            sum = sum + (X-Y)*A
    elif(X>Y):
        sum = 2*C*X+A*(X-Y)
    else:
        sum = 2*C*X

else:
    sum = X*A + Y*B

print(sum)