


def       lowerCAmelCase			(		lowerCAmelCase_			)->			Any:
				lowerCAmelCase_			:   Tuple     					=					[701, 301, 132, 57, 23, 10, 4, 1]
				for gap in gaps:
								for i in range(lowerCAmelCase_			, len(lowerCAmelCase_			)			):
												lowerCAmelCase_			:   Any     					=					collection[i]
												lowerCAmelCase_			:   int     					=					i
												while j >= gap and collection[j - gap] > insert_value:
																lowerCAmelCase_			:   List[str]     					=					collection[j - gap]
																j -= gap
												if j != i:
																lowerCAmelCase_			:   List[Any]     					=					insert_value
				return collection


if __name__ == "__main__":
						from doctest import testmod

						testmod()
						_UpperCAmelCase      :	Union[str, Any]  =input("""Enter numbers separated by a comma:\n""").strip()
						_UpperCAmelCase      :	str  =[int(item) for item in user_input.split(""",""")]
						print(shell_sort(unsorted))



def       lowerCAmelCase			(		lowerCAmelCase_			)->			int:
				lowerCAmelCase_			:   Optional[int]     					=					len(lowerCAmelCase_			)
				if n in (0, 1):
								return 0
				return sum(query * (n - i - 1) for i, query in enumerate(sorted(lowerCAmelCase_			)			)			)


if __name__ == "__main__":
						import doctest

						doctest.testmod()