def delete(S):
    check=False
    for s in range(len(S)-1):
        if S[s]=="0" and S[s+1]=="1":
            del S[s]
            del S[s]
            check=True
            break
        if S[s]=="1" and S[s+1]=="0":
            del S[s]
            del S[s]
            check=True
            break
    return check,S
S= [i for i in input()]
ans= 0
check=True
while check == True:
    check,S = delete(S)
    if check == False:
        break
    else:
        ans+=2
print(ans)