"""simple docstring"""







from __future__ import annotations


def      __lowerCAmelCase(		__UpperCAmelCase			):






	"""simple docstring"""





	if len(__UpperCAmelCase			) == 0:
		return array

	_lowercase				,      _lowercase :    Any							=							min(__UpperCAmelCase			), max(__UpperCAmelCase			)

	# Compute the variables
	_lowercase :    Optional[int]							=							_max - _min + 1
	_lowercase				,      _lowercase :    List[str]							=							[0] * holes_range, [0] * holes_range

	# Make the sorting.
	for i in array:
		_lowercase :    Dict							=							i - _min
		_lowercase :    Optional[Any]							=							i
		holes_repeat[index] += 1

	# Makes the array back by replacing the numbers.
	_lowercase :    Tuple							=							0
	for i in range(__UpperCAmelCase			):
		while holes_repeat[i] > 0:
			_lowercase :    List[str]							=							holes[i]
			index += 1
			holes_repeat[i] -= 1

    # Returns the sorted array.
	return array


if __name__ == "__main__":
						import doctest

						doctest.testmod()
						SCREAMING_SNAKE_CASE									=						input('Enter numbers separated by comma:\n')
						SCREAMING_SNAKE_CASE									=						[int(x) for x in user_input.split(',')]
						print(pigeon_sort(unsorted))




"""simple docstring"""







import math


def      __lowerCAmelCase(		__UpperCAmelCase			):






	"""simple docstring"""





	if not isinstance(__UpperCAmelCase     ,__UpperCAmelCase			):
		_lowercase :    List[Any]							=							F'''Input value of [number={number}] must be an integer'''
		raise TypeError(__UpperCAmelCase			)

	if number < 1:
		_lowercase :    List[Any]							=							F'''Input value of [number={number}] must be > 0'''
		raise ValueError(__UpperCAmelCase			)
	elif number == 1:
		return 3
	elif number == 2:
		return 5
	else:
		_lowercase :    str							=							int(math.log(number // 3     ,2			)			) + 2

		_lowercase :    Union[str, Any]							=							[3, 5]
		_lowercase :    Optional[int]							=							2
		_lowercase :    List[Any]							=							3
		for block in range(1     ,__UpperCAmelCase			):
			for _ in range(__UpperCAmelCase			):
				proth_list.append(2 ** (block + 1) + proth_list[proth_index - 1]			)
				proth_index += 1
			increment *= 2

	return proth_list[number - 1]


if __name__ == "__main__":
						import doctest

						doctest.testmod()

						for number in range(11):
												SCREAMING_SNAKE_CASE									=						0
												try:
																		SCREAMING_SNAKE_CASE									=						proth(number)
												except ValueError:
																		print(f"""ValueError: there is no {number}th Proth number""")
																		continue

												print(f"""The {number}th Proth number: {value}""")



