




"""simple docstring"""


from __future__ import annotations


def       UpperCAmelCase__ (snake_case__							:      List[str]	,     snake_case__							:      List[Any]					):
  """simple docstring"""

  if len(UpperCAmelCase__					) <= 1 or n <= 1:
    return

  insert_next(UpperCAmelCase__	,     n - 1					)
  rec_insertion_sort(UpperCAmelCase__	,     n - 1					)


def       UpperCAmelCase__ (snake_case__							:      str	,     snake_case__							:      List[str]					):
  """simple docstring"""

  if index >= len(UpperCAmelCase__					) or collection[index - 1] <= collection[index]:
    return

  # Swaps adjacent elements since they are not in ascending order
  _snake_case	,      _snake_case							:	Union[str, Any]			=						(
      collection[index],
      collection[index - 1],
  )

  insert_next(UpperCAmelCase__	,     index + 1					)


if __name__ == "__main__":
       A_      			=       input('''Enter integers separated by spaces: ''')
       A_      			=       [int(num) for num in numbers.split()]
       rec_insertion_sort(number_list, len(number_list))
       print(number_list)








"""simple docstring"""


def       UpperCAmelCase__ (snake_case__							:      int					):
  """simple docstring"""

  if not isinstance(snake_case__	,     snake_case__					) or number < 0:
    raise ValueError("""Input must be a non-negative integer"""					)

  _snake_case							:	Dict			=						0
  while number:
    # This way we arrive at next set bit (next 1) instead of looping
    # through each bit and checking for 1s hence the
    # loop won't run 32 times it will only run the number of `1` times
    number &= number - 1
    count += 1
  return count


if __name__ == "__main__":
     import doctest

     doctest.testmod()


