s=input()

x='10'
y='01'

def hoge(s):
    if x in s or y in s:
        for i in range(len(s)-1):
            if s[i]+s[i+1]==x or s[i]+s[i+1]==y:
                s=s[:i]+s[i+2:]
                
                return hoge(s)+2
    else:
        return 0

print(hoge(s))