def    a__       (						__UpperCamelCase ):
      SCREAMING_SNAKE_CASE_      =     len(__UpperCamelCase )
      for i in range(1   ,					__UpperCamelCase ):
            SCREAMING_SNAKE_CASE_      =     collection[i]
            SCREAMING_SNAKE_CASE_      =     0
            SCREAMING_SNAKE_CASE_      =     i - 1

            while low <= high:
                  SCREAMING_SNAKE_CASE_      =     (low + high) // 2
                  if val < collection[mid]:
                        SCREAMING_SNAKE_CASE_      =     mid - 1
                  else:
                        SCREAMING_SNAKE_CASE_      =     mid + 1
            for j in range(__UpperCamelCase   ,					__UpperCamelCase   ,					-1 ):
                  SCREAMING_SNAKE_CASE_      =     collection[j - 1]
            SCREAMING_SNAKE_CASE_      =     val
      return collection


if __name__ == "__main__":
      A   :     str       =				input("Enter numbers separated by a comma:\n").strip()
      A   :     Any       =				[int(item) for item in user_input.split(",")]
      print(binary_insertion_sort(unsorted))



from functools import lru_cache


@lru_cache
def    a__       (						__UpperCamelCase ):
      if num < 0:
            raise ValueError("Number should not be negative." )

      return 1 if num in (0, 1) else num * factorial(num - 1 )


if __name__ == "__main__":
      import doctest

      doctest.testmod()


