cube=list(input())
ans=0
while True:
      if cube ==[] or set(cube)=={"1"} or set(cube)=={"0"}:
          break
      else:
         for i in range(len(cube)-1):
           if cube[i-1]!=cube[i] :
             del cube[i]
             del cube[i-1]
             ans+=2
             break
print(ans)
