'''simple docstring'''






from collections.abc import Generator






def  UpperCamelCase__					(					)							->	Generator[int, None, None]:
  __UpperCAmelCase:					Optional[int]		= 0, 1
  while True:
    __UpperCAmelCase:					Union[str, Any]		= b, a + b
    yield b






def  UpperCamelCase__					(					_lowercase    :				int = 1_0_0_0     )							->	int:
  __UpperCAmelCase:					Dict		= 1
  __UpperCAmelCase:					Optional[int]		= fibonacci_generator()
  while len(str(next(_lowercase     )     )     ) < n:
    answer += 1
  return answer + 1


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






import itertools
import math






def  UpperCamelCase__					(					_lowercase    :				int     )							->	bool:

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






def  UpperCamelCase__					(					)							->	Optional[int]:
  __UpperCAmelCase:					Union[str, Any]		= 2
  while True:
    if is_prime(_lowercase     ):
      yield num
    num += 1






def  UpperCamelCase__					(					_lowercase    :				int = 1_0_0_0_1     )							->	int:
  return next(itertools.islice(prime_generator()   ,    nth - 1   ,    _lowercase     )     )


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