def process():
    global S
    global cnt
    p = 0
    for i in range(len(S)-1):
        if S[i:i+2] == '01' or S[i:i+2] == '10':
            S=S[:i]+S[i+2:]
            p+=2
            
    cnt += p
    if p == 0:
        print(cnt)
    else:
        process()

S = str(input())
cnt = int()
process()
