s=list(map(int,input()))
k=len(s)
count=0
flag=True
while flag==True:
    flag=False
    for i in range(k-1):
        if s[i]==0 and s[i+1] or s[i]==1 and s[i+1]==0:
            s[i]=-1
            s[i+1]=-1
            k-=2
            count+=2
            flag=True
        else:
            continue
    try:
        for j in s:
            s.remove(-1)
    except:
        pass
        
print(count)  
