

'''simple docstring'''
import itertools
import math


def        _lowerCAmelCase					(						_UpperCamelCase						:     int				)      ->			Optional[int]:
     """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(math.sqrt(snake_case__				) + 1				)							, 6				):
          if number % i == 0 or number % (i + 2) == 0:
               return False
     return True


def        _lowerCAmelCase					(						)      ->			Optional[int]:
     """simple docstring"""




     _SCREAMING_SNAKE_CASE							    =2
     while True:
          if is_prime(snake_case__				):
               yield num
          num += 1


def        _lowerCAmelCase					(						_UpperCamelCase						:     int = 1_00_01				)      ->			Optional[int]:
     """simple docstring"""




     return next(itertools.islice(prime_generator()							, nth - 1							, snake_case__				)				)


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






"""simple docstring"""


from math import factorial

A_						=				{str(d): factorial(d) for d in range(10)}


def 					UpperCAmelCase__       (snake_case__							:					int    ):
  """simple docstring"""

  return sum(DIGIT_FACTORIAL[d] for d in str(snake_case__    )    )


def 					UpperCAmelCase__       ():
  """simple docstring"""

  _snake_case							:		List[str]								=  7 * factorial(9    ) + 1
  return sum(i for i in range(3		,   snake_case__    ) if sum_of_digit_factorial(snake_case__    ) == i    )


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


