s = input()
count = 0
while "01" in s or "10" in s:
    while "01" in s:
        s = s.replace("01", "", 1)
        count += 1
    while "10" in s:
        s = s.replace("10", "", 1)
        count += 1

print(count * 2)
