# coding: utf-8
# Your code here!

a =input()
N=list(a)

count=[]
def search(x):
    n=len(N)
    if(x+1>=n):
        return 
    
    if(N[x]=="0" and N[x+1]=="1"):
        #print(N)
        del N[x]
        del N[x+1]
        #print(N)
        count.append(0)
        x=0
    if(N[x]=="1" and N[x+1]=="0"):
        #print(N)
        del N[x]
        del N[x+1]
        #print(N)
        count.append(0)
        x=0    
        
    search(x+1)
ans=search(0)
#print(N)
if(len(count)!=0):
    print(len(count)*2+2)
else:
    print(0)