[a] = list(map(str, input().split()))

flag=1
count=0

while(flag==1):
    flag=0
    for i in range(len(a)-1):
        if(int(a[i])+int(a[i+1])==1):
            count+=1
            b=a
            if(i==len(a)-2):
                a=b[:i+1]
            else:
                a=b[:i+1]+b[i+2:]
            flag=1
            break
            
print(count*2)