s = input()
k = 0
while True:
  if "10" in s:
    i = s.index("10")
    s = list(s)
    s.pop(i)
    s.pop(i)
    s = "".join(s)
    k += 2
  elif "01" in s:
    i = s.index("10")
    s = list(s)
    s.pop(i)
    s.pop(i)
    s = "".join(s)
    k += 2
  else:
    print(k)
    break