S = input()

#print('01' in S)
#print('10' in S)

count = 0

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

print(count * 2)


