s = input()
vanishing_amount = 0

if s[0] == '0':
    pattarn = '01'
elif s[0] == '1':
    pattarn = '10'

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

print(vanishing_amount)
