S = input()

num = 0
while True:
    p = S.find('01')
    if p > -1:
        S = S[:p] + S[p + 2:]
        num += 2
    else:
        break
while True:
    p = S.find('10')
    if p > -1:
        S = S[:p] + S[p + 2:]
        num += 2
    else:
        print(num)
        break
