s=[i for i in input()]
cnt=0
for i in range(100000000000000000):
    l=len(s)
    if l==0 or s.count("0")==l or s.count("1")==l:
        break
    else:
        for i in range(l):
            try:
                if int(s[i])+int(s[i+1])==1:
                    cnt+=2
                    s=s[0:i]+s[i+2:]
            except:
                pass
print(cnt)