S=str(input())
s=[]
c1=0
c0=0
for i in range(len(S)):
  s.append(S[i])
  if S[i]=='0':
    c0+=1
  else:
    c1+=1
c=0
while min(c0,c1)>0:
  for i in range(len(s)-1):
    if s[i:i+2]==['1','0'] or s[i:i+2]==['0','1']:
      c0-=1
      c1-=1
      s.remove(s[i])
      s.remove(s[i])
      c+=1
      break
print(2*c)