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