s = [i for i in str(input())]
 
count = 0

while True:
  s = [int(i) for i in s]
  
  if len(s) != 0 and sum(s) != 0 and sum(s) != len(s):
    for i in range(int(len(s))):
      if s[i] != s[i+1]:
        s.pop(i)
        s.pop(i)
        count += 2
        break
      else:
        print(count)
        break