import re
a = input()
operations = 0
re.search("01", a) or re.search("10", a)
i = 0
while re.search("01", a) or re.search("10", a):
    if re.search("01", a):
        a = a.replace("01", "", 1)
        operations += 2
    if re.search("10", a):
        a = a.replace("10", "", 1)
        operations += 2
print(operations)