s = list(map(int, input()))
print(s)
c = 0
count = 0
while(c==0):
  for i in range(len(s)):
    if sum(s) == len(s) or sum(s) == 0:
      c=1
      break
    print(i,len(s),s)
    if i == len(s)-1:
      break
    if len(s) == 2 and sum(s) == 1:
      count+=2
      c=1
      break
    if s[i] + s[i+1] == 1:
      del s[i]
      del s[i]
      count += 2
      break
print(count)    
  