S = input()

count = 0

while '01' in S or '10' in S:
    if '01' in S:
        count += S.count('01')
        S = S.replace('01', '')
    if '10' in S:
        count += S.count('10')
        S = S.replace('10', '')

print(count * 2)
