





"""simple docstring"""



from __future__ import annotations







def 						__lowercase	(  snake_case_    :    list[int]							,snake_case_    :    int							,snake_case_    :    int							,snake_case_    :    int		)  ->None:



    '''simple docstring'''







    if (direction == 1 and array[indexa] > array[indexa]) or (
        direction == 0 and array[indexa] < array[indexa]
    ):
        __A					,			__A       :		str							=	array[indexa], array[indexa]







def 						__lowercase	(  snake_case_    :    list[int]							,snake_case_    :    int							,snake_case_    :    int							,snake_case_    :    int		)  ->None:



    '''simple docstring'''







    if length > 1:
        __A       :		Optional[int]							=	int(length / 2		)
        for i in range(snake_case_							,low + middle		):
            comp_and_swap(snake_case_							,snake_case_							,i + middle							,snake_case_		)
        bitonic_merge(snake_case_							,snake_case_							,snake_case_							,snake_case_		)
        bitonic_merge(snake_case_							,low + middle							,snake_case_							,snake_case_		)







def 						__lowercase	(  snake_case_    :    list[int]							,snake_case_    :    int							,snake_case_    :    int							,snake_case_    :    int		)  ->None:



    '''simple docstring'''







    if length > 1:
        __A       :		Any							=	int(length / 2		)
        bitonic_sort(snake_case_							,snake_case_							,snake_case_							,1		)
        bitonic_sort(snake_case_							,low + middle							,snake_case_							,0		)
        bitonic_merge(snake_case_							,snake_case_							,snake_case_							,snake_case_		)


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

       bitonic_sort(unsorted, 0, len(unsorted), 1)
       print("""\nSorted array in ascending order is: """, end="""""")
       print(*unsorted, sep=""", """)

       bitonic_merge(unsorted, 0, len(unsorted), 0)
       print("""Sorted array in descending order is: """, end="""""")
       print(*unsorted, sep=""", """)











"""simple docstring"""



def 						__lowercase	(  snake_case_    :    int		)  ->int:



    '''simple docstring'''







    __A       :		str							=	1
    for i in range(1							,num + 1		):
        fact *= i
    return fact







def 						__lowercase	(  snake_case_    :    int		)  ->int:



    '''simple docstring'''







    __A       :		str							=	0
    while number > 0:
        __A       :		Optional[int]							=	number % 10
        sum_of_digits += last_digit
        __A       :		Dict							=	number // 10  # Removing the last_digit from the given number
    return sum_of_digits







def 						__lowercase	(  snake_case_    :    int = 100		)  ->int:



    '''simple docstring'''







    __A       :		Optional[int]							=	factorial(snake_case_		)
    __A       :		Optional[Any]							=	split_and_add(snake_case_		)
    return result


if __name__ == "__main__":
       print(solution(int(input("""Enter the Number: """).strip())))




