





from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_tokenizers_available, is_torch_available


SCREAMING_SNAKE_CASE_      :			str		  =      {
    '''configuration_nystromformer''': ['''NYSTROMFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''NystromformerConfig'''],
}

try:
		if not is_torch_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		SCREAMING_SNAKE_CASE_      :			Dict		  =      [
		    '''NYSTROMFORMER_PRETRAINED_MODEL_ARCHIVE_LIST''',
		    '''NystromformerForMaskedLM''',
		    '''NystromformerForMultipleChoice''',
		    '''NystromformerForQuestionAnswering''',
		    '''NystromformerForSequenceClassification''',
		    '''NystromformerForTokenClassification''',
		    '''NystromformerLayer''',
		    '''NystromformerModel''',
		    '''NystromformerPreTrainedModel''',
		]


if TYPE_CHECKING:
		from .configuration_nystromformer import NYSTROMFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP, NystromformerConfig

		try:
				if not is_torch_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .modeling_nystromformer import (
				    NYSTROMFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
				    NystromformerForMaskedLM,
				    NystromformerForMultipleChoice,
				    NystromformerForQuestionAnswering,
				    NystromformerForSequenceClassification,
				    NystromformerForTokenClassification,
				    NystromformerLayer,
				    NystromformerModel,
				    NystromformerPreTrainedModel,
				)


else:
		import sys

		SCREAMING_SNAKE_CASE_      :			List[str]		  =      _LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)











from math import floor, sqrt



def    SCREAMING_SNAKE_CASE							(			snake_case       )		->						int:
		__lowercase					=    0.0
		__lowercase					=    1.0
		__lowercase					=    int(sqrt(snake_case       )       )
		__lowercase					=    root
		__lowercase					=    0
		while integer_part != 2 * root:
				__lowercase					=    denominator * integer_part - numerator
				__lowercase					=    (n - numerator**2) / denominator
				__lowercase					=    int((root + numerator) / denominator       )
				period += 1
		return period



def    SCREAMING_SNAKE_CASE							(			snake_case = 10_000       )		->						int:
		__lowercase					=    0
		for i in range(2	,      n + 1       ):
				__lowercase					=    sqrt(snake_case       )
				if sr - floor(snake_case       ) != 0 and continuous_fraction_period(snake_case       ) % 2 == 1:
						count_odd_periods += 1
		return count_odd_periods


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




