


"""simple docstring"""







from __future__ import annotations

from random import choice




def    UpperCAmelCase__       (lowerCAmelCase_   ):




					'''simple docstring'''


					return choice(lowerCAmelCase_   )




def    UpperCAmelCase__       (lowerCAmelCase_  ,						lowerCAmelCase_   ):




					'''simple docstring'''


					__SCREAMING_SNAKE_CASE						   =				random_pivot(lowerCAmelCase_   )

					# partition based on pivot
					# linear time
					__SCREAMING_SNAKE_CASE						   =				[e for e in lst if e < pivot]
					__SCREAMING_SNAKE_CASE						   =				[e for e in lst if e > pivot]

					# if we get lucky, pivot might be the element we want.
					# we can easily see this:
					# small (elements smaller than k)
					# + pivot (kth element)
					# + big (elements larger than k)
					if len(lowerCAmelCase_   ) == k - 1:
										return pivot
					# pivot is in elements bigger than k
					elif len(lowerCAmelCase_   ) < k - 1:
										return kth_number(lowerCAmelCase_  ,						k - len(lowerCAmelCase_   ) - 1   )
					# pivot is in elements smaller than k
					else:
										return kth_number(lowerCAmelCase_  ,						lowerCAmelCase_   )


if __name__ == "__main__":
		import doctest

		doctest.testmod()




"""simple docstring"""







def    UpperCAmelCase__       (lowerCAmelCase_ = 100_0000   ):




					'''simple docstring'''


					__SCREAMING_SNAKE_CASE						   =				set(range(3  ,						lowerCAmelCase_  ,						2   )   )
					primes.add(2   )
					for p in range(3  ,						lowerCAmelCase_  ,						2   ):
										if p not in primes:
															continue
										primes.difference_update(set(range(p * p  ,						lowerCAmelCase_  ,						lowerCAmelCase_   )   )   )

					__SCREAMING_SNAKE_CASE						   =				[float(lowerCAmelCase_   ) for n in range(limit + 1   )]

					for p in primes:
										for n in range(lowerCAmelCase_  ,						limit + 1  ,						lowerCAmelCase_   ):
															phi[n] *= 1 - 1 / p

					return int(sum(phi[2:]   )   )


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