t = ['01','10']
s = input()

def count_removal(c):
  is_01 = c.count(t[0])
  is_10 = c.count(t[1])
  if is_01 >= is_10 and is_01 > 0:
    return count_removal(c.replace(t[0], '')) + c.count(t[0]) * 2
  elif is_01 < is_10 and is_10 > 0:
    return count_removal(c.replace(t[1], '')) + c.count(t[1]) * 2
  else:
    return 0

print(count_removal(s))