

import itertools
import math


def    __a							( SCREAMING_SNAKE_CASE   )   ->  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(UpperCAmelCase__   ) + 1   )							, 6   ):
        if number % i == 0 or number % (i + 2) == 0:
            return False
    return True


def    __a							( )   ->  int:






    '''simple docstring'''
    __UpperCAmelCase					       =      2
    while True:
        if is_prime(UpperCAmelCase__   ):
            yield num
        num += 1


def    __a							( SCREAMING_SNAKE_CASE = 1_0_0_0_1   )   ->  Optional[Any]:






    '''simple docstring'''
    return next(itertools.islice(prime_generator()							, nth - 1							, UpperCAmelCase__   )   )


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









def      __lowercase(						UpperCAmelCase__			):


      """simple docstring"""



      if n == 1 or not isinstance(UpperCAmelCase__ , UpperCAmelCase__			):
            return 0
      elif n == 2:
            return 1
      else:
            lowerCamelCase             =		[0, 1]
            for i in range(2 , n + 1			):
                  sequence.append(sequence[i - 1] + sequence[i - 2]			)

            return sequence[n]

def      __lowercase(						UpperCAmelCase__			):


      """simple docstring"""



      lowerCamelCase             =		0
      lowerCamelCase             =		2

      while digits < n:
            index += 1
            lowerCamelCase             =		len(str(fibonacci(UpperCAmelCase__			)			)			)

      return index

def      __lowercase(						UpperCAmelCase__ = 1000			):


      """simple docstring"""



      return fibonacci_digits_index(UpperCAmelCase__			)


if __name__ == "__main__":
     print(solution(int(str(input()).strip())))