S = input()
n = 0
while True:
    if '01' in S:
        i = S.index('01')
        S = S[0 : i] + S[i + 2:]
    elif '10' in S:
        i = S.index('10')
        S = S[0 : i] + S[i + 2:]
    else:
        break
    n += 1

print(2 * n)


