S = "".join(list(input()))

ans = 0

while True:
    if S.find("10") == -1 and S.find("01") == -1:
        break
    if S.find("10") > -1:
        S = S.replace("10","",1)
        ans += 2
    elif S.find("01") > -1:
        S = S.replace("01","",1)
        ans += 2
    
print(ans)
