S=list(input())
c=0
while len(S)>1:
    before=len(S)
    for i in range(len(S)-1):
        #print(S[i]+S[i+1])
        if S[i]+S[i+1]=="01" or S[i]+S[i+1]=="10":
            c+=2
            S.pop(i)
            S.pop(i)
            break
    after=len(S)
    if before==after:
        break

#print(S)
print(c)
