



'''simple docstring'''






from math import ceil, sqrt






def  UpperCamelCase__					(					_lowercase    :				int = 1_0_0_0_0_0_0     )							->	int:
  __UpperCAmelCase:					Optional[int]		= 0

  for outer_width in range(3   ,    (limit // 4) + 2     ):
    if outer_width**2 > limit:
      __UpperCAmelCase:					Union[str, Any]		= max(ceil(sqrt(outer_width**2 - limit     )     )   ,    1     )
    else:
      __UpperCAmelCase:					Optional[int]		= 1
    if (outer_width - hole_width_lower_bound) % 2:
      hole_width_lower_bound += 1

    answer += (outer_width - hole_width_lower_bound - 2) // 2 + 1

  return answer


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






from __future__ import annotations






def  UpperCamelCase__					(					_lowercase    :				list[int]   ,    _lowercase    :				int   ,    _lowercase    :				int   ,    _lowercase    :				int     )							->	None:
  if (direction == 1 and array[indexa] > array[indexa]) or (
      direction == 0 and array[indexa] < array[indexa]
  ):
    __UpperCAmelCase, __UpperCAmelCase:					str		= array[indexa], array[indexa]






def  UpperCamelCase__					(					_lowercase    :				list[int]   ,    _lowercase    :				int   ,    _lowercase    :				int   ,    _lowercase    :				int     )							->	None:
  if length > 1:
    __UpperCAmelCase:					List[str]		= int(length / 2     )
    for i in range(_lowercase   ,    low + middle     ):
      comp_and_swap(_lowercase   ,    _lowercase   ,    i + middle   ,    _lowercase     )
    bitonic_merge(_lowercase   ,    _lowercase   ,    _lowercase   ,    _lowercase     )
    bitonic_merge(_lowercase   ,    low + middle   ,    _lowercase   ,    _lowercase     )






def  UpperCamelCase__					(					_lowercase    :				list[int]   ,    _lowercase    :				int   ,    _lowercase    :				int   ,    _lowercase    :				int     )							->	None:
  if length > 1:
    __UpperCAmelCase:					Any		= int(length / 2     )
    bitonic_sort(_lowercase   ,    _lowercase   ,    _lowercase   ,    1     )
    bitonic_sort(_lowercase   ,    low + middle   ,    _lowercase   ,    0     )
    bitonic_merge(_lowercase   ,    _lowercase   ,    _lowercase   ,    _lowercase     )


if __name__ == "__main__":
    SCREAMING_SNAKE_CASE_	   =			input('Enter numbers separated by a comma:\n').strip()
    SCREAMING_SNAKE_CASE_	   =			[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=', ')