S = (input())
ans = 0
while True:
    if "01" in S:
        S = S.replace("01","",1)
        ans+=2
    elif "10" in S:
        S = S.replace("10","",1)
        ans+=2
    else:
        break
print(ans)