S = input()

count = 0
while S.find("01") != -1 or S.find("10") != -1:
    if S.find("01") != -1:
        S = S.replace("01","",1)
    elif S.find("10") != -1:
        S = S.replace("10","",1)
    count += 2
print(count)