from math import floor, sqrt


def 							lowerCAmelCase__    (       a__      )	->int:




  '''simple docstring'''

  _UpperCamelCase				=  0.0
  _UpperCamelCase				=  1.0
  _UpperCamelCase				=  int(sqrt(a__      )      )
  _UpperCamelCase				=  root
  _UpperCamelCase				=  0
  while integer_part != 2 * root:
    _UpperCamelCase				=  denominator * integer_part - numerator
    _UpperCamelCase				=  (n - numerator**2) / denominator
    _UpperCamelCase				=  int((root + numerator) / denominator      )
    period += 1
  return period


def 							lowerCAmelCase__    (       a__ = 10_000      )	->int:




  '''simple docstring'''

  _UpperCamelCase				=  0
  for i in range(2  ,			n + 1      ):
    _UpperCamelCase				=  sqrt(a__      )
    if sr - floor(a__      ) != 0 and continuous_fraction_period(a__      ) % 2 == 1:
      count_odd_periods += 1
  return count_odd_periods


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





from typing import TYPE_CHECKING

# rely on isort to merge the imports
from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_sentencepiece_available, is_torch_available


lowerCamelCase__   = {
    '''configuration_ernie_m''': ['''ERNIE_M_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''ErnieMConfig'''],
}

try:
   if not is_sentencepiece_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   lowerCamelCase__   = ['''ErnieMTokenizer''']

try:
   if not is_torch_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   lowerCamelCase__   = [
       '''ERNIE_M_PRETRAINED_MODEL_ARCHIVE_LIST''',
       '''ErnieMForMultipleChoice''',
       '''ErnieMForQuestionAnswering''',
       '''ErnieMForSequenceClassification''',
       '''ErnieMForTokenClassification''',
       '''ErnieMModel''',
       '''ErnieMPreTrainedModel''',
       '''ErnieMForInformationExtraction''',
   ]


if TYPE_CHECKING:
   from .configuration_ernie_m import ERNIE_M_PRETRAINED_CONFIG_ARCHIVE_MAP, ErnieMConfig

   try:
      if not is_sentencepiece_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .tokenization_ernie_m import ErnieMTokenizer

   try:
      if not is_torch_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .modeling_ernie_m import (
          ERNIE_M_PRETRAINED_MODEL_ARCHIVE_LIST,
          ErnieMForInformationExtraction,
          ErnieMForMultipleChoice,
          ErnieMForQuestionAnswering,
          ErnieMForSequenceClassification,
          ErnieMForTokenClassification,
          ErnieMModel,
          ErnieMPreTrainedModel,
      )


else:
   import sys

   lowerCamelCase__   = _LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)




