"""simple docstring"""







from math import factorial



class  _lowerCamelCase			:







				def __init__( self    :       Tuple			,					lowerCamelCase_    :       Optional[Any]			,					lowerCamelCase_    :       Union[str, Any]						):

					"""simple docstring"""






					_lowercase :    Any							=							real
					if isinstance(lowerCamelCase_			,					lowerCamelCase_						):
						_lowercase :    Union[str, Any]							=							[1] * rank
					else:
						_lowercase :    str							=							rank







				def __repr__( self    :       Any						):

					"""simple docstring"""






					return (
					    F'''{self.real}+'''
					    F'''{'+'.join(str(lowerCamelCase_						)+'E'+str(n+1						)for n,dual in enumerate(self.duals						)						)}'''
					)







				def 							__UpperCAmelCase					( self    :       List[Any]						):

					"""simple docstring"""






					_lowercase :    Tuple							=							self.duals.copy()
					while cur[-1] == 0:
						cur.pop(-1						)
					return Dual(self.real			,					lowerCamelCase_						)







				def __add__( self    :       Optional[Any]			,					lowerCamelCase_    :       Optional[Any]						):

					"""simple docstring"""






					if not isinstance(lowerCamelCase_			,					lowerCamelCase_						):
						return Dual(self.real + other			,					self.duals						)
					_lowercase :    str							=							self.duals.copy()
					_lowercase :    List[str]							=							other.duals.copy()
					if len(lowerCamelCase_						) > len(lowerCamelCase_						):
						o_dual.extend([1] * (len(lowerCamelCase_						) - len(lowerCamelCase_						))						)
					elif len(lowerCamelCase_						) < len(lowerCamelCase_						):
						s_dual.extend([1] * (len(lowerCamelCase_						) - len(lowerCamelCase_						))						)
					_lowercase :    Dict							=							[]
					for i in range(len(lowerCamelCase_						)						):
						new_duals.append(s_dual[i] + o_dual[i]						)
					return Dual(self.real + other.real			,					lowerCamelCase_						)

				_snake_case     =  __add__







				def __sub__( self    :       Any			,					lowerCamelCase_    :       Union[str, Any]						):

					"""simple docstring"""






					return self + other * -1







				def __mul__( self    :       str			,					lowerCamelCase_    :       Union[str, Any]						):

					"""simple docstring"""






					if not isinstance(lowerCamelCase_			,					lowerCamelCase_						):
						_lowercase :    str							=							[]
						for i in self.duals:
							new_duals.append(i * other						)
						return Dual(self.real * other			,					lowerCamelCase_						)
					_lowercase :    Optional[int]							=							[0] * (len(self.duals						) + len(other.duals						) + 1)
					for i, item in enumerate(self.duals						):
						for j, jtem in enumerate(other.duals						):
							new_duals[i + j + 1] += item * jtem
					for k in range(len(self.duals						)						):
						new_duals[k] += self.duals[k] * other.real
					for index in range(len(other.duals						)						):
						new_duals[index] += other.duals[index] * self.real
					return Dual(self.real * other.real			,					lowerCamelCase_						)

				_snake_case     =  __mul__







				def __truediv__( self    :       Union[str, Any]			,					lowerCamelCase_    :       Tuple						):

					"""simple docstring"""






					if not isinstance(lowerCamelCase_			,					lowerCamelCase_						):
						_lowercase :    List[str]							=							[]
						for i in self.duals:
							new_duals.append(i / other						)
						return Dual(self.real / other			,					lowerCamelCase_						)
					raise ValueError







				def __floordiv__( self    :       int			,					lowerCamelCase_    :       int						):

					"""simple docstring"""






					if not isinstance(lowerCamelCase_			,					lowerCamelCase_						):
						_lowercase :    Tuple							=							[]
						for i in self.duals:
							new_duals.append(i // other						)
						return Dual(self.real // other			,					lowerCamelCase_						)
					raise ValueError







				def __pow__( self    :       Tuple			,					lowerCamelCase_    :       str						):

					"""simple docstring"""






					if n < 0 or isinstance(lowerCamelCase_			,					lowerCamelCase_						):
						raise ValueError('power must be a positive integer'						)
					if n == 0:
						return 1
					if n == 1:
						return self
					_lowercase :    Union[str, Any]							=							self
					for _ in range(n - 1						):
						x *= self
					return x



def      __lowerCAmelCase(		__UpperCAmelCase     ,__UpperCAmelCase     ,__UpperCAmelCase			):






	"""simple docstring"""





	if not callable(__UpperCAmelCase			):
		raise ValueError('differentiate() requires a function as input for func'			)
	if not isinstance(__UpperCAmelCase     ,(float, int)			):
		raise ValueError('differentiate() requires a float as input for position'			)
	if not isinstance(__UpperCAmelCase     ,__UpperCAmelCase			):
		raise ValueError('differentiate() requires an int as input for order'			)
	_lowercase :    List[str]							=							Dual(__UpperCAmelCase     ,1			)
	_lowercase :    Tuple							=							func(__UpperCAmelCase			)
	if order == 0:
		return result.real
	return result.duals[order - 1] * factorial(__UpperCAmelCase			)


if __name__ == "__main__":
						import doctest

						doctest.testmod()


						def      __lowerCAmelCase(		__UpperCAmelCase			):






							"""simple docstring"""





							return y**2 * y**4







						print(differentiate(f, 9, 2))




"""simple docstring"""







from __future__ import annotations


def      __lowerCAmelCase(		__UpperCAmelCase			):






	"""simple docstring"""





	_lowercase :    Any							=							[True] * limit
	_lowercase :    Union[str, Any]							=							False
	_lowercase :    Any							=							False
	_lowercase :    List[Any]							=							True

	for i in range(3     ,int(limit**0.5 + 1			)     ,2			):
		_lowercase :    Optional[Any]							=							i * 2
		while index < limit:
			_lowercase :    int							=							False
			_lowercase :    Tuple							=							index + i

	_lowercase :    Optional[Any]							=							[2]

	for i in range(3     ,__UpperCAmelCase     ,2			):
		if is_prime[i]:
			primes.append(__UpperCAmelCase			)

	return primes


def      __lowerCAmelCase(		__UpperCAmelCase = 1_000_000			):






	"""simple docstring"""





	_lowercase :    Optional[Any]							=							prime_sieve(__UpperCAmelCase			)
	_lowercase :    int							=							0
	_lowercase :    List[Any]							=							0

	for i in range(len(__UpperCAmelCase			)			):
		for j in range(i + length     ,len(__UpperCAmelCase			)			):
			_lowercase :    List[Any]							=							sum(primes[i:j]			)
			if sol >= ceiling:
				break

			if sol in primes:
				_lowercase :    Optional[int]							=							j - i
				_lowercase :    Tuple							=							sol

	return largest


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



