import re
s = input()
vanishing_amount = 0

if s[0] == '0':
    pattarn = re.compile('01')
elif s[0] == '1':
    pattarn = re.compile('10')

while True:
    former_length = len(s)
    s = re.sub(pattarn, "", s, 1)
    later_length = len(s)
    if former_length == later_length:
        break
    vanishing_amount += 2

print(vanishing_amount)
