s=input()
l=[]
for ss in s:
  l.append(ss)
n=len(s)
cnt=0
i=0
while cnt<=n and i<=len(l)-2:
  if l[i]=='0' and l[i+1]=='1':
    if i<0:
      i=0
    cnt+=2
    del l[i:i+2]
    i=i-1
  elif l[i]=='1' and l[i+1]=='0':
    if i<0:
      i=0
    cnt+=2
    del l[i:i+2]
    i=i-1
  else:
    i+=1
print(cnt)