S=list(input())
ans=0
while 1:
  flag=0
  for i in range(len(S)-1):
    if S[i:i+2]==["0","1"] or S[i:i+2]==["1","0"]:
      del S[i:i+2]
      ans+=2
      flag=1
  
  if flag==0:
    break
print(ans)