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