s = input()








count = 0
while True:
    index = s.find("01")
    if index == -1:
        index = s.find("10")
    if index == -1:
        break
    else:
        # s = s.replace(s[index: index + 2], "")
        s = s[:index] + s[index + 2:]
        count += 2


print(count)