S = str(input())
N = len(S)
cnt = 0
S.replace('01','')
i=0
while S.count('01')>0 or S.count('10')>0:
    if S.count('01')>0:
        i = S.find('01')
        if i==0:
            S = S[2:]
        elif i+1==N-1:
            S = S[:N-2]
        else:
            S = S[:i]+S[i+2:]
        cnt+=2
    else:
        i = S.find('10')
        if i==0:
            S = S[2:]
        elif i+1==N-1:
            S = S[:N-2]
        else:
            S = S[:i]+S[i+2:]
        cnt+=2
print(cnt)