



"""simple docstring"""







import os

from apache_beam.io.filesystems import FileSystems
from apache_beam.pipeline import Pipeline

from .logging import get_logger


UpperCAmelCase:  Tuple			     =				2 << 20  # 2mb
UpperCAmelCase:  Tuple			     =				get_logger(__name__)





class   UpperCamelCase	(     snake_case       ):




	"""simple docstring"""






	def    lowerCamelCase__					(     self   ):
			_lowercase				: int     =   self._options.get_all_options().get("""runner"""   )
			return runner in [None, "DirectRunner", "PortableRunner"]







def  __SCREAMING_SNAKE_CASE (  __UpperCAmelCase   ,				__UpperCAmelCase   ,				__UpperCAmelCase=False      ):
		_lowercase				: Dict     =   FileSystems
		if fs.exists(__UpperCAmelCase      ):
				if force_upload:
						logger.info(F"""Remote path already exist: {remote_file_path}. Overwriting it as force_upload=True."""      )
				else:
						logger.info(F"""Remote path already exist: {remote_file_path}. Skipping it as force_upload=False."""      )
						return
		with fs.create(__UpperCAmelCase      ) as remote_file:
				with open(__UpperCAmelCase   ,				"""rb"""      ) as local_file:
						_lowercase				: Optional[Any]     =   local_file.read(__UpperCAmelCase      )
						while chunk:
								remote_file.write(__UpperCAmelCase      )
								_lowercase				: Tuple     =   local_file.read(__UpperCAmelCase      )


def  __SCREAMING_SNAKE_CASE (  __UpperCAmelCase   ,				__UpperCAmelCase   ,				__UpperCAmelCase=False      ):
		_lowercase				: Optional[int]     =   FileSystems
		if os.path.exists(__UpperCAmelCase      ):
				if force_download:
						logger.info(F"""Local path already exist: {remote_file_path}. Overwriting it as force_upload=True."""      )
				else:
						logger.info(F"""Local path already exist: {remote_file_path}. Skipping it as force_upload=False."""      )
						return
		with fs.open(__UpperCAmelCase      ) as remote_file:
				with open(__UpperCAmelCase   ,				"""wb"""      ) as local_file:
						_lowercase				: List[str]     =   remote_file.read(__UpperCAmelCase      )
						while chunk:
								local_file.write(__UpperCAmelCase      )
								_lowercase				: List[Any]     =   remote_file.read(__UpperCAmelCase      )








"""simple docstring"""







from math import floor, sqrt


def  __SCREAMING_SNAKE_CASE (  __UpperCAmelCase      ):
		_lowercase				: Optional[int]     =   0.0
		_lowercase				: Dict     =   1.0
		_lowercase				: Optional[int]     =   int(sqrt(__UpperCAmelCase      )      )
		_lowercase				: Optional[Any]     =   root
		_lowercase				: Dict     =   0
		while integer_part != 2 * root:
				_lowercase				: str     =   denominator * integer_part - numerator
				_lowercase				: Optional[int]     =   (n - numerator**2) / denominator
				_lowercase				: List[str]     =   int((root + numerator) / denominator      )
				period += 1
		return period


def  __SCREAMING_SNAKE_CASE (  __UpperCAmelCase = 10000      ):
		_lowercase				: List[str]     =   0
		for i in range(2   ,				n + 1      ):
				_lowercase				: Dict     =   sqrt(__UpperCAmelCase      )
				if sr - floor(__UpperCAmelCase      ) != 0 and continuous_fraction_period(__UpperCAmelCase      ) % 2 == 1:
						count_odd_periods += 1
		return count_odd_periods


if __name__ == "__main__":
		print(F'{solution(int(input().strip()))}')



