





'''simple docstring'''






from __future__ import annotations

from random import randrange





def    lowercase_   (		lowercase__    ) ->list:
						if len(a_    ) < 2:
												return collection
						_snake_case: List[str]	       =		randrange(len(a_    )    )  # Use random element as pivot
						_snake_case: Union[str, Any]	       =		collection[pivot_index]
						_snake_case: List[str]	       =		[]  # All elements greater than pivot
						_snake_case: Dict	       =		[]  # All elements less than or equal to pivot

						for element in collection[:pivot_index]:
												(greater if element > pivot else lesser).append(a_    )

						for element in collection[pivot_index + 1 :]:
												(greater if element > pivot else lesser).append(a_    )

						return [*quick_sort(a_    ), pivot, *quick_sort(a_    )]


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







"""simple docstring"""







def       __UpperCAmelCase		(		a_      :		list[int]					)  ->							int:

   # validate:
   if not isinstance(a_     ,	a_					) or not all(
       isinstance(a_     ,	a_					) and item >= 0 for item in citations					):
      raise ValueError("The citations should be a list of non negative integers."					)

   citations.sort()
   _UpperCAmelCase 						=       len(a_					)

   for i in range(a_					):
      if citations[len_citations - 1 - i] <= i:
         return i

   return len_citations


if __name__ == "__main__":
  import doctest

  doctest.testmod()

