S = list(input())

count = 0
i = 0
while len(set(S))>1:
    if S[i] != S[i+1]:
        S.remove('0')
        S.remove('1')
        count += 2
        if i != 0:
            i -= 1
    else:
        i += 1
print(count)