import re
a = input()
operations = 0
length_a = len(a)
if not re.search("01", a) and not re.search("01", a):
    print(0)
else:
    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)