s = input()
s = list(s)
 
def del_01(s,counter):
  for i in range(len(s)-1):
    if s[i] == '1' and s[i+1] == '0':
      s[i] ='w'
      s[i+1] = 'w'
      counter += 2
    elif s[i] == '0' and s[i+1] == '1':
      s[i] = 'w'
      s[i+1] = 'w'
      counter += 2
  s.remove('w')
  return s, counter
counter = 0
while (s.count('0') != 0) and (s.count('1') != 0) and (s != []):
  s, counter = del_01(s, counter)

print(counter)