s = list(input())
n = len(s)
i = 0
count = 0
while i < n-1:
    if (s[i]=="0" and s[i+1]=="1") or (s[i]=='1' and s[i+1]=='0'):
        s.pop(i)
        s.pop(i)
        count += 2
        i= 0
        n = len(s)
    else:
        i += 1
    
    
print(count)