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