import copy
S=input()
sx=list(str(S))
s=list(map(int,sx))
#print(s)
cnt=0
while(1):
    t=copy.deepcopy(s) 
    for i in range(len(s)-1):
        if s[i]+s[i+1]==1:
            s.pop(i+1)
            s.pop(i)
            cnt+=2
            break
    if s==t:
        break
print(cnt)