S = list(input())
con = 1
max = 0
while con != 0 :
    con = 0
    if (len(S) <= 1):
        break
    for x in range(len(S)-1):
        # print(S[x]+":"+S[x+1])
        if(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]
        #    print(S)
           con = 1
           break
print(max)