




'''simple docstring'''


def    _SCREAMING_SNAKE_CASE    (			UpperCamelCase__						:				Union[str, Any]   ,						UpperCamelCase__						:				Tuple   ,						UpperCamelCase__						:				Tuple							):




     """simple docstring"""


     a_    :       List[Any]    	=     index
     a_    :       List[Any]    	=     2 * index + 1
     a_    :       Optional[Any]    	=     2 * index + 2
     if left_index < heap_size and unsorted[left_index] > unsorted[largest]:
          a_    :       List[str]    	=     left_index

     if right_index < heap_size and unsorted[right_index] > unsorted[largest]:
          a_    :       Optional[int]    	=     right_index

     if largest != index:
          a_    :       str    	=     unsorted[index], unsorted[largest]
          heapify(snake_case__   ,						snake_case__   ,						snake_case__							)



def    _SCREAMING_SNAKE_CASE    (			UpperCamelCase__						:				str							):




     """simple docstring"""


     a_    :       List[Any]    	=     len(snake_case__							)
     for i in range(n // 2 - 1   ,						-1   ,						-1							):
          heapify(snake_case__   ,						snake_case__   ,						snake_case__							)
     for i in range(n - 1   ,						0   ,						-1							):
          a_    :       List[str]    	=     unsorted[i], unsorted[0]
          heapify(snake_case__   ,						0   ,						snake_case__							)
     return unsorted


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






'''simple docstring'''


def    _SCREAMING_SNAKE_CASE    (			UpperCamelCase__						:				int = 1000							):




     """simple docstring"""


     return sum(i for i in range(UpperCamelCase__							) if i % 3 == 0 or i % 5 == 0							)


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