S=[i for i in input()]
m=0
while True:
  f=0
  for i in range(len(S)-1):
    if (S[i]=='1' and S[i+1]=='0') or (S[i]=='0' and S[i+1]=='1'):
      S.pop(i+1)
      S.pop(i)
      m+=2
      f=1
      break
  if f==0:
    break
print(m)