s = list(input())
res = 0
while True:
  temp = len(s)
  for i in range(temp):
    try:
      if int(s[i])+int(s[i+1]) == 1:
        s.pop(i)
        s.pop(i+1)
        res += 2
    except:
      break
  if temp == len(s):
    print(res)
    break
  