import copy
S=list(str(input()))
kae=copy.copy(S)
ans=0
while True:
  con=0
  S=[i for i in S if i!=-100]
  for i in range(len(S)-1):
    if int(S[i])+int(S[i+1])==1:
      S[i]=-100
      S[i+1]=-100
      ans+=2
      con+=1
  if con==0:
    break
print(ans)