# 初期入力
import sys
#input = sys.stdin.readline  #文字列では使わない
#S =input().strip()
*S, = input() 
count =0
flag =1
while len(S) >=2 and flag==1:
    flag =0
    for i in range(len(S)):
        if S[i:i+2] ==["1","0"] or S[i:i+2] ==["0","1"]:
            #print(S[i:2])
            del S[i:i+2]
            #print(S,end=" ")
            count +=2
            #print(count)
            flag =1
print(count)