



'''simple docstring'''





import math
def        _SCREAMING_SNAKE_CASE  (	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(math.sqrt(SCREAMING_SNAKE_CASE_      ) + 1      )							,   6      ):
        if number % i == 0 or number % (i + 2) == 0:
            return False
    return True
def        _SCREAMING_SNAKE_CASE  (	UpperCamelCase = 10001      ):



    """simple docstring"""





    try:
        lowerCAmelCase__			:  int											= int(SCREAMING_SNAKE_CASE_      )
    except (TypeError, ValueError):
        raise TypeError("""Parameter nth must be int or castable to int."""      ) from None
    if nth <= 0:
        raise ValueError("""Parameter nth must be greater than or equal to one."""      )
    lowerCAmelCase__			:  str											= []
    lowerCAmelCase__			:  Any											= 2
    while len(SCREAMING_SNAKE_CASE_      ) < nth:
        if is_prime(SCREAMING_SNAKE_CASE_      ):
            primes.append(SCREAMING_SNAKE_CASE_      )
            num += 1
        else:
            num += 1
    return primes[len(SCREAMING_SNAKE_CASE_      ) - 1]


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







'''simple docstring'''





def        _SCREAMING_SNAKE_CASE  (	UpperCamelCase							,   UpperCamelCase							,   UpperCamelCase      ):



    """simple docstring"""





    def count_of_possible_combinations(UpperCamelCase      ) -> int:
        if target < 0:
            return 0
        if target == 0:
            return 1
        return sum(count_of_possible_combinations(target - item      ) for item in array      )

    return count_of_possible_combinations(UpperCamelCase      )
def        _SCREAMING_SNAKE_CASE  (	UpperCamelCase							,   UpperCamelCase							,   UpperCamelCase      ):



    """simple docstring"""





    def count_of_possible_combinations_with_dp_array(
        UpperCamelCase							,   UpperCamelCase      ) -> int:
        if target < 0:
            return 0
        if target == 0:
            return 1
        if dp_array[target] != -1:
            return dp_array[target]
        lowerCAmelCase__			:  Any											= sum(
            count_of_possible_combinations_with_dp_array(target - item							,   UpperCamelCase      )
            for item in array      )
        lowerCAmelCase__			:  Tuple											= answer
        return answer

    lowerCAmelCase__			:  Optional[int]											= [-1] * (target + 1)
    return count_of_possible_combinations_with_dp_array(UpperCamelCase							,   UpperCamelCase      )
def        _SCREAMING_SNAKE_CASE  (	UpperCamelCase							,   UpperCamelCase							,   UpperCamelCase      ):



    """simple docstring"""





    lowerCAmelCase__			:  str											= [0] * (target + 1)
    lowerCAmelCase__			:  List[Any]											= 1

    for i in range(1							,   target + 1      ):
        for j in range(UpperCamelCase      ):
            if i - array[j] >= 0:
                dp_array[i] += dp_array[i - array[j]]

    return dp_array[target]


if __name__ == "__main__":
 import doctest

 doctest.testmod()
 _lowerCAmelCase										=     3
 _lowerCAmelCase										=     5
 _lowerCAmelCase										=     [1, 2, 5]
 print(combination_sum_iv(n, array, target))


