#120 C
S =input()
min_=min(S.count('0'),S.count('1'))
cnt=0
for i in range(min_):
    if S.count('01')>0:
        S=S.replace('01','',1)
        cnt+=2
    if  S.count('10')>0:
        S=S.replace('10','',1)
        cnt+=2
print(cnt)