


'''simple docstring'''







def    lowerCAmelCase__ (       lowerCamelCase  :    list     ):
       _A  :			str											=      len(lowerCamelCase     )

       # Set the gap value to be decreased by a factor of 1.3
       # after each iteration
       _A  :			Optional[int]											=      1.3

       # Continue sorting until the gap is 1
       while gap > 1:
              # Decrease the gap value
              _A  :			str											=      int(gap / shrink     )

              # Sort the elements using insertion sort
              for i in range(lowerCamelCase						,len(lowerCamelCase     )     ):
                     _A  :			Dict											=      collection[i]
                     _A  :			List[Any]											=      i
                     while j >= gap and collection[j - gap] > temp:
                            _A  :			int											=      collection[j - gap]
                            j -= gap
                     _A  :			int											=      temp

       return collection


if __name__ == "__main__":
      import doctest

      doctest.testmod()










'''simple docstring'''







import itertools






def    lowerCAmelCase__ (       lowerCamelCase  :    int = 1000000     ):
       _A  :			str											=      [1]

       for i in itertools.count(len(lowerCamelCase     )     ):
              _A  :			Optional[Any]											=      0
              for j in itertools.count(1     ):
                     _A  :			int											=      -1 if j % 2 == 0 else +1
                     _A  :			Optional[Any]											=      (j * j * 3 - j) // 2
                     if index > i:
                            break
                     item += partitions[i - index] * sign
                     item %= number
                     index += j
                     if index > i:
                            break
                     item += partitions[i - index] * sign
                     item %= number

              if item == 0:
                     return i
              partitions.append(lowerCamelCase     )

       return 0


if __name__ == "__main__":
   import doctest

   doctest.testmod()

   print(f"""{solution() = }""")






