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