



"""simple docstring"""







import math
from decimal import Decimal, getcontext


def       __SCREAMING_SNAKE_CASE      (   __UpperCAmelCase = 4000000	):

		try:
				_lowercase							:      int			=					int(__UpperCAmelCase	)
		except (TypeError, ValueError):
				raise TypeError("""Parameter n must be int or castable to int."""	)
		if n <= 0:
				raise ValueError("""Parameter n must be greater than or equal to one."""	)
		_lowercase							:      Optional[int]			=					100
		_lowercase							:      Union[str, Any]			=					(Decimal(5	) ** Decimal(0.5	) + 1) / Decimal(2	)

		_lowercase							:      Optional[Any]			=					(math.floor(math.log(n * (phi + 2)					,							__UpperCAmelCase	) - 1	) // 3) * 3 + 2
		_lowercase							:      Dict			=					Decimal(round(phi ** Decimal(index + 1	)	)	) / (phi + 2)
		_lowercase							:      Optional[int]			=					num // 2
		return int(__UpperCAmelCase	)


if __name__ == "__main__":
		print(F'{solution() = }')









'''simple docstring'''


def 		snake_case_    (UpperCamelCase       :  List[str] ,						UpperCamelCase       :  List[Any] ,						UpperCamelCase       :  Union[str, Any]      ):





							'''simple docstring'''


							_a	     =				index
							_a	     =				2 * index + 1
							_a	     =				2 * index + 2
							if left_index < heap_size and unsorted[left_index] > unsorted[largest]:
														_a	     =				left_index

							if right_index < heap_size and unsorted[right_index] > unsorted[largest]:
														_a	     =				right_index

							if largest != index:
														_a     ,							_a	     =				unsorted[index], unsorted[largest]
														heapify(UpperCamelCase ,						UpperCamelCase ,						UpperCamelCase      )
def 		snake_case_    (UpperCamelCase       :  Union[str, Any]      ):





							'''simple docstring'''


							_a	     =				len(UpperCamelCase      )
							for i in range(n // 2 - 1 ,						-1 ,						-1      ):
														heapify(UpperCamelCase ,						UpperCamelCase ,						UpperCamelCase      )
							for i in range(n - 1 ,						0 ,						-1      ):
														_a     ,							_a	     =				unsorted[i], unsorted[0]
														heapify(UpperCamelCase ,						0 ,						UpperCamelCase      )
							return unsorted


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

