


from math import factorial
class 		__magic_name__						:





     '''simple docstring'''



     def __init__(					self:List[str]     ,		_a:Tuple     ,		_a:List[Any]   ):
       snake_case__						= real
       if isinstance(_a     ,		_a   ):
         snake_case__						= [1] * rank
       else:
         snake_case__						= rank

     def __repr__(					self:Union[str, Any]   ):
       return (
           F"""{self.real}+"""
           F"""{'+'.join(str(_a   )+'E'+str(n+1   )for n,dual in enumerate(self.duals   )   )}"""
       )

     def 	SCREAMING_SNAKE_CASE__						(					self:str   ):
       snake_case__						= self.duals.copy()
       while cur[-1] == 0:
         cur.pop(-1   )
       return Dual(self.real     ,		_a   )

     def __add__(					self:Union[str, Any]     ,		_a:str   ):
       if not isinstance(_a     ,		_a   ):
         return Dual(self.real + other     ,		self.duals   )
       snake_case__						= self.duals.copy()
       snake_case__						= other.duals.copy()
       if len(_a   ) > len(_a   ):
         o_dual.extend([1] * (len(_a   ) - len(_a   ))   )
       elif len(_a   ) < len(_a   ):
         s_dual.extend([1] * (len(_a   ) - len(_a   ))   )
       snake_case__						= []
       for i in range(len(_a   )   ):
         new_duals.append(s_dual[i] + o_dual[i]   )
       return Dual(self.real + other.real     ,		_a   )

     __lowercase				:							Union[str, Any]	   =       __add__

     def __sub__(					self:List[str]     ,		_a:List[Any]   ):
       return self + other * -1

     def __mul__(					self:Union[str, Any]     ,		_a:List[Any]   ):
       if not isinstance(_a     ,		_a   ):
         snake_case__						= []
         for i in self.duals:
           new_duals.append(i * other   )
         return Dual(self.real * other     ,		_a   )
       snake_case__						= [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     ,		_a   )

     __lowercase				:							str	   =       __mul__

     def __truediv__(					self:List[Any]     ,		_a:List[Any]   ):
       if not isinstance(_a     ,		_a   ):
         snake_case__						= []
         for i in self.duals:
           new_duals.append(i / other   )
         return Dual(self.real / other     ,		_a   )
       raise ValueError

     def __floordiv__(					self:Dict     ,		_a:List[str]   ):
       if not isinstance(_a     ,		_a   ):
         snake_case__						= []
         for i in self.duals:
           new_duals.append(i // other   )
         return Dual(self.real // other     ,		_a   )
       raise ValueError







     def __pow__(					self:Optional[Any]     ,		_a:Tuple   ):
       if n < 0 or isinstance(_a     ,		_a   ):
         raise ValueError('''power must be a positive integer'''   )
       if n == 0:
         return 1
       if n == 1:
         return self
       snake_case__						= self
       for _ in range(n - 1   ):
         x *= self
       return x







def SCREAMING_SNAKE_CASE	(			__lowerCAmelCase							,   __lowerCAmelCase							,   __lowerCAmelCase				)    ->				Any:






  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'''				)
  snake_case__						= Dual(UpperCamelCase__							,   1				)
  snake_case__						= func(UpperCamelCase__				)
  if order == 0:
    return result.real
  return result.duals[order - 1] * factorial(UpperCamelCase__				)


if __name__ == "__main__":
   import doctest

   doctest.testmod()







   def SCREAMING_SNAKE_CASE	(			__lowerCAmelCase				)    ->				Any:
     return y**2 * y**4


   print(differentiate(f, 9, 2))




from math import sqrt





def    __lowerCamelCase      (					UpperCamelCase__ ):







							'''simple docstring'''






							if 1 < number < 4:
														# 2 and 3 are primes
														return True
							elif number < 2 or number % 2 == 0 or number % 3 == 0:
														# Negatives, 0, 1, all even numbers, all multiples of 3 are not primes
														return False

							# All primes number are in format of 6k +/- 1
							for i in range(5  ,				int(sqrt(UpperCamelCase__ ) + 1 )  ,				6 ):
														if number % i == 0 or number % (i + 2) == 0:
																					return False
							return True





def    __lowerCamelCase      (					UpperCamelCase__ = 10001 ):







							'''simple docstring'''






							snake_case_     							=       0
							snake_case_     							=       1
							while count != nth and number < 3:
														number += 1
														if is_prime(UpperCamelCase__ ):
																					count += 1
							while count != nth:
														number += 2
														if is_prime(UpperCamelCase__ ):
																					count += 1
							return number


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




