S = list(input())
con = 1
max = 0
while con != 0 :
    con = 0
    if (len(S) <= 1):
        break
    x = 0
    while True :
        if (x >= len(S)-1):
             break
        if(x <= len(S)-1 and 
            S[x] == '0' and S[x+1] == '1' or
            S[x] == '1' and S[x+1] == '0' ):
            max += 2
            del S[x:x+1+1]
            con = 1
        x += 1

print(max)