s = str(input())
ans = 0
while(True):
    if s.find("01") != -1:
        s = s.replace("01","",1)
        ans += 2
    elif s.find("10") != -1:
        s = s.replace("10","",1)        
        ans += 2
    else:
        break

print(ans)