



'''simple docstring'''







def  SCREAMING_SNAKE_CASE__ (				SCREAMING_SNAKE_CASE     ):

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

		citations.sort()
		SCREAMING_SNAKE_CASE_						:str										=      len(SCREAMING_SNAKE_CASE     )

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

		return len_citations


if __name__ == "__main__":
							import doctest

							doctest.testmod()





'''simple docstring'''







def  SCREAMING_SNAKE_CASE__ (				SCREAMING_SNAKE_CASE     ):
		for i, _ in enumerate(SCREAMING_SNAKE_CASE     ):
				if (i % 2 == 1) == (nums[i - 1] > nums[i]):
						SCREAMING_SNAKE_CASE_						,		SCREAMING_SNAKE_CASE_						:Dict										=      nums[i], nums[i - 1]

		return nums


if __name__ == "__main__":
							print("""Enter the array elements:""")
							SCREAMING_SNAKE_CASE__     : Tuple				=   list(map(int, input().split()))
							print("""The unsorted array is:""")
							print(array)
							print("""Array after Wiggle sort:""")
							print(wiggle_sort(array))
