s = list(map(int,input()))
#print(s)
bool =True
x =0
cnt = 0
while bool:
    if  1  not in s or 0 not in s:
        #print('finA')
        break
    if len(s)>=2 and x==len(s)-1:
        x=0
    else:
        if s[x]==1 and s[x+1]==0:
            s.pop(x+1)
            s.pop(x)
            cnt+=2
            #print(len(s))
            #print(s)
            if len(s)<=1:
                #print('finB')
                break
        if s[x]==0 and s[x+1]==1:
            s.pop(x+1)
            s.pop(x)
            cnt+=2
            #print(len(s))
            #print(s)
            if len(s)<=1:
                #print('finC')
                break
        else:
            x+=1
print(cnt)