def resolve():
  s = input()
  num_b = 0
  num_r = 0
  for c in s:
    if c == '0':
      num_r += 1
    else:
      num_b += 1
  print(min(num_b, num_r) * 2)
  return

if __name__ == "__main__":
  resolve() def resolve():
  s = input()
  num_b = 0
  num_r = 0
  for c in s:
    if c == '0':
      num_r += 1
    else:
      num_b += 1
  print(min(num_b, num_r) * 2)
  return resolve s = input() s input() input num_b = 0 num_b 0 num_r = 0 num_r 0 for c in s:
    if c == '0':
      num_r += 1
    else:
      num_b += 1
   c s if c == '0':
      num_r += 1
    else:
      num_b += 1
   c == '0' c '0' num_r += 1 num_r 1 num_b += 1 num_b 1 print(min(num_b, num_r) * 2) print min(num_b, num_r) * 2 min(num_b, num_r) min num_b num_r 2 return if __name__ == "__main__":
  resolve() __name__ == "__main__" __name__ "__main__" resolve() resolve def resolve():
  s = input()
  num_b = 0
  num_r = 0
  for c in s:
    if c == '0':
      num_r += 1
    else:
      num_b += 1
  print(min(num_b, num_r) * 2)
  return def resolve():
  s = input()
  num_b = 0
  num_r = 0
  for c in s:
    if c == '0':
      num_r += 1
    else:
      num_b += 1
  print(min(num_b, num_r) * 2)
  return resolve
def resolve():
  s = input()
  num_b = 0
  num_r = 0
  for c in s:
    if c == '0':
      num_r += 1
    else:
      num_b += 1
  print(min(num_b, num_r) * 2)
  return

if __name__ == "__main__":
  resolve()
