def 	__lowerCamelCase							(UpperCAmelCase__     :							int  ):

					if num <= 0:
										raise ValueError("Input must be a positive integer"  )

					SCREAMING_SNAKE_CASE    			=       [True] * (num + 1)

					SCREAMING_SNAKE_CASE    			=       2
					while p * p <= num:
										if primes[p]:
															for i in range(p * p      , num + 1      , UpperCAmelCase__  ):
																				SCREAMING_SNAKE_CASE    			=       False
										p += 1

					return [prime for prime in range(2      , num + 1  ) if primes[prime]]


if __name__ == "__main__":
			import doctest

			doctest.testmod()

			_lowerCamelCase					:   Optional[Any]							=		int(input('''Enter a positive integer: ''').strip())
			print(prime_sieve_eratosthenes(user_num))





import functools





def 	__lowerCamelCase							(UpperCAmelCase__     :							list[int]      , UpperCAmelCase__     :							list[int]  ):

					# Validation
					if not isinstance(UpperCAmelCase__      , UpperCAmelCase__  ) or not all(isinstance(UpperCAmelCase__      , UpperCAmelCase__  ) for day in days  ):
										raise ValueError("The parameter days should be a list of integers"  )

					if len(UpperCAmelCase__  ) != 3 or not all(isinstance(UpperCAmelCase__      , UpperCAmelCase__  ) for cost in costs  ):
										raise ValueError("The parameter costs should be a list of three integers"  )

					if len(UpperCAmelCase__  ) == 0:
										return 0

					if min(UpperCAmelCase__  ) <= 0:
										raise ValueError("All days elements should be greater than 0"  )

					if max(UpperCAmelCase__  ) >= 3_6_6:
										raise ValueError("All days elements should be less than 366"  )

					SCREAMING_SNAKE_CASE    			=       set(UpperCAmelCase__  )

					@functools.cache
					def dynamic_programming(UpperCAmelCase__     :							int  ) -> int:
										if index > 3_6_5:
															return 0

										if index not in days_set:
															return dynamic_programming(index + 1  )

										return min(
										    costs[0] + dynamic_programming(index + 1  )      , costs[1] + dynamic_programming(index + 7  )      , costs[2] + dynamic_programming(index + 3_0  )      , )

					return dynamic_programming(1  )


if __name__ == "__main__":
							import doctest

							doctest.testmod()




