code: 
  
  
  '''simple docstring'''
  
  
  
  from math import floor, sqrt
  
  
  
  def     UpperCAmelCase__      (			UpperCAmelCase_					:       int							)  ->	int:
       __lowerCamelCase     :			Dict              =	0.0
       __lowerCamelCase     :			str              =	1.0
       __lowerCamelCase     :			Dict              =	int(sqrt(UpperCAmelCase_							)							)
       __lowerCamelCase     :			Tuple              =	root
       __lowerCamelCase     :			Optional[Any]              =	0
       while integer_part != 2 * root:
            __lowerCamelCase     :			List[Any]              =	denominator * integer_part - numerator
            __lowerCamelCase     :			str              =	(n - numerator**2) / denominator
            __lowerCamelCase     :			int              =	int((root + numerator) / denominator							)
            period += 1
       return period
  
  
  
  def     UpperCAmelCase__      (			UpperCAmelCase_					:       int = 1_00_00							)  ->	int:
       __lowerCamelCase     :			Any              =	0
       for i in range(2   ,					n + 1							):
            __lowerCamelCase     :			Optional[Any]              =	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()))}''')
  
  
  
  
  
  
  
style_context: 
  
  
  '''simple docstring'''
  
  
  
  from typing import TYPE_CHECKING
  
  from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_sentencepiece_available, is_torch_available
  
  
  A__	:      Optional[Any]				=						{
      """configuration_xlm_prophetnet""": ["""XLM_PROPHETNET_PRETRAINED_CONFIG_ARCHIVE_MAP""", """XLMProphetNetConfig"""],
  }
  
  try:
        if not is_sentencepiece_available():
              raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
        pass
  else:
        A__	:      List[Any]				=						["""XLMProphetNetTokenizer"""]
  
  try:
        if not is_torch_available():
              raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
        pass
  else:
        A__	:      Optional[Any]				=						[
            """XLM_PROPHETNET_PRETRAINED_MODEL_ARCHIVE_LIST""",
            """XLMProphetNetDecoder""",
            """XLMProphetNetEncoder""",
            """XLMProphetNetForCausalLM""",
            """XLMProphetNetForConditionalGeneration""",
            """XLMProphetNetModel""",
            """XLMProphetNetPreTrainedModel""",
        ]
  
  
  if TYPE_CHECKING:
        from .configuration_xlm_prophetnet import XLM_PROPHETNET_PRETRAINED_CONFIG_ARCHIVE_MAP, XLMProphetNetConfig
  
        try:
              if not is_sentencepiece_available():
                    raise OptionalDependencyNotAvailable()
        except OptionalDependencyNotAvailable:
              pass
        else:
              from .tokenization_xlm_prophetnet import XLMProphetNetTokenizer
  
        try:
              if not is_torch_available():
                    raise OptionalDependencyNotAvailable()
        except OptionalDependencyNotAvailable:
              pass
        else:
              from .modeling_xlm_prophetnet import (
                  XLM_PROPHETNET_PRETRAINED_MODEL_ARCHIVE_LIST,
                  XLMProphetNetDecoder,
                  XLMProphetNetEncoder,
                  XLMProphetNetForCausalLM,
                  XLMProphetNetForConditionalGeneration,
                  XLMProphetNetModel,
                  XLMProphetNetPreTrainedModel,
              )
  
  else:
        import sys
  
        A__	:      List[str]				=						_LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)
  
  
  
  
  
  
  