

'''simple docstring'''

import math




def 							_UpperCamelCase				(   lowerCAmelCase__:					list		,lowerCAmelCase__:					int = 0		,lowerCAmelCase__:					int = 0   )      -> list:
							SCREAMING_SNAKE_CASE_				=				end or len(lowerCAmelCase__   )
							for i in range(lowerCAmelCase__		,lowerCAmelCase__   ):
														SCREAMING_SNAKE_CASE_				=				i
														SCREAMING_SNAKE_CASE_				=				array[i]
														while temp_index != start and temp_index_value < array[temp_index - 1]:
																					SCREAMING_SNAKE_CASE_				=				array[temp_index - 1]
																					temp_index -= 1
														SCREAMING_SNAKE_CASE_				=				temp_index_value
							return array




def 							_UpperCamelCase				(   lowerCAmelCase__:					list		,lowerCAmelCase__:					int		,lowerCAmelCase__:					int   )      -> None:  # Max Heap
							SCREAMING_SNAKE_CASE_				=				index
							SCREAMING_SNAKE_CASE_				=				2 * index + 1  # Left Node
							SCREAMING_SNAKE_CASE_				=				2 * index + 2  # Right Node

							if left_index < heap_size and array[largest] < array[left_index]:
														SCREAMING_SNAKE_CASE_				=				left_index

							if right_index < heap_size and array[largest] < array[right_index]:
														SCREAMING_SNAKE_CASE_				=				right_index

							if largest != index:
														SCREAMING_SNAKE_CASE_				,    SCREAMING_SNAKE_CASE_				=				array[largest], array[index]
														heapify(lowerCAmelCase__		,lowerCAmelCase__		,lowerCAmelCase__   )




def 							_UpperCamelCase				(   lowerCAmelCase__:					list   )      -> list:
							SCREAMING_SNAKE_CASE_				=				len(lowerCAmelCase__   )

							for i in range(n // 2		,-1		,-1   ):
														heapify(lowerCAmelCase__		,lowerCAmelCase__		,lowerCAmelCase__   )

							for i in range(n - 1		,0		,-1   ):
														SCREAMING_SNAKE_CASE_				,    SCREAMING_SNAKE_CASE_				=				array[0], array[i]
														heapify(lowerCAmelCase__		,0		,lowerCAmelCase__   )

							return array




def 							_UpperCamelCase				(   lowerCAmelCase__:					list		,lowerCAmelCase__:					int		,lowerCAmelCase__:					int		,lowerCAmelCase__:					int   )      -> int:
							if (array[first_index] > array[middle_index]) != (
							    array[first_index] > array[last_index]
							):
														return array[first_index]
							elif (array[middle_index] > array[first_index]) != (
							    array[middle_index] > array[last_index]
							):
														return array[middle_index]
							else:
														return array[last_index]




def 							_UpperCamelCase				(   lowerCAmelCase__:					list		,lowerCAmelCase__:					int		,lowerCAmelCase__:					int		,lowerCAmelCase__:					int   )      -> int:
							SCREAMING_SNAKE_CASE_				=				low
							SCREAMING_SNAKE_CASE_				=				high
							while True:
														while array[i] < pivot:
																					i += 1
														j -= 1
														while pivot < array[j]:
																					j -= 1
														if i >= j:
																					return i
														SCREAMING_SNAKE_CASE_				,    SCREAMING_SNAKE_CASE_				=				array[j], array[i]
														i += 1




def 							_UpperCamelCase				(   lowerCAmelCase__:					list   )      -> list:
							if len(lowerCAmelCase__   ) == 0:
														return array
							SCREAMING_SNAKE_CASE_				=				2 * math.ceil(math.loga(len(lowerCAmelCase__   )   )   )
							SCREAMING_SNAKE_CASE_				=				16
							return intro_sort(lowerCAmelCase__		,0		,len(lowerCAmelCase__   )		,lowerCAmelCase__		,lowerCAmelCase__   )




def 							_UpperCamelCase				(   lowerCAmelCase__:					list		,lowerCAmelCase__:					int		,lowerCAmelCase__:					int		,lowerCAmelCase__:					int		,lowerCAmelCase__:					int   )      -> list:
							while end - start > size_threshold:
														if max_depth == 0:
																					return heap_sort(lowerCAmelCase__   )
														max_depth -= 1
														SCREAMING_SNAKE_CASE_				=				median_of_a(lowerCAmelCase__		,lowerCAmelCase__		,start + ((end - start) // 2) + 1		,end - 1   )
														SCREAMING_SNAKE_CASE_				=				partition(lowerCAmelCase__		,lowerCAmelCase__		,lowerCAmelCase__		,lowerCAmelCase__   )
														intro_sort(lowerCAmelCase__		,lowerCAmelCase__		,lowerCAmelCase__		,lowerCAmelCase__		,lowerCAmelCase__   )
														SCREAMING_SNAKE_CASE_				=				p
							return insertion_sort(lowerCAmelCase__		,lowerCAmelCase__		,lowerCAmelCase__   )


if __name__ == "__main__":
							import doctest

							doctest.testmod()

							SCREAMING_SNAKE_CASE							:				Any     	=			input("Enter numbers separated by a comma : ").strip()
							SCREAMING_SNAKE_CASE							:				Optional[Any]     	=			[float(item) for item in user_input.split(",")]
							print(sort(unsorted))








'''simple docstring'''

def 							_UpperCamelCase				(   lowerCAmelCase__:					int = 1000   )      -> int:
							SCREAMING_SNAKE_CASE_				=				2**power
							SCREAMING_SNAKE_CASE_				=				str(lowerCAmelCase__   )
							SCREAMING_SNAKE_CASE_				=				list(lowerCAmelCase__   )
							SCREAMING_SNAKE_CASE_				=				0

							for i in list_num:
														sum_of_num += int(lowerCAmelCase__   )

							return sum_of_num


if __name__ == "__main__":
							SCREAMING_SNAKE_CASE							:				Tuple     	=			int(input("Enter the power of 2: ").strip())
							print("2 ^ ", power, " = ", 2**power)
							SCREAMING_SNAKE_CASE							:				str     	=			solution(power)
							print("Sum of the digits is: ", result)





