S=input()
ans=0
r=b=0
for s in S:
    if s=='0':
        if b>0:
            b-=0
            ans+=2
        else:
            r+=1
    else:
        if r>0:
            r-=1
            ans+=2
        else:
            b+=1
print(ans)