


from math import floor, sqrt




def 			UpperCamelCase			(					_a						)    ->							Optional[Any]:
     '''simple docstring'''





     lowercase_				:List[str]       			=				0.0
     lowercase_				:str       			=				1.0
     lowercase_				:List[str]       			=				int(sqrt(lowerCAmelCase_						)						)
     lowercase_				:Optional[int]       			=				root
     lowercase_				:str       			=				0
     while integer_part != 2 * root:
          lowercase_				:Union[str, Any]       			=				denominator * integer_part - numerator
          lowercase_				:List[str]       			=				(n - numerator**2) / denominator
          lowercase_				:Dict       			=				int((root + numerator) / denominator						)
          period += 1
     return period




def 			UpperCamelCase			(					_a = 1_0_0_0_0						)    ->							Optional[Any]:
     '''simple docstring'''





     lowercase_				:Any       			=				0
     for i in range(2				,						n + 1						):
          lowercase_				:Optional[Any]       			=				sqrt(lowerCAmelCase_						)
          if sr - floor(lowerCAmelCase_						) != 0 and continuous_fraction_period(lowerCAmelCase_						) % 2 == 1:
               count_odd_periods += 1
     return count_odd_periods


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







import unittest
from pathlib import Path

from transformers import is_vision_available, load_tool
from transformers.testing_utils import get_tests_dir

from .test_tools_common import ToolTesterMixin


if is_vision_available():
     from PIL import Image





class  __lowerCamelCase       (    unittest.TestCase	,				UpperCamelCase__    ):




    """simple docstring"""

    def    a      (       self     :     Any   )      ->       Tuple:
         lowerCAmelCase__		= load_tool("image-captioning"   )
         self.tool.setup()
         lowerCAmelCase__		= load_tool("image-captioning"   ,	remote=SCREAMING_SNAKE_CASE__   )


    def    a      (       self     :     int   )      ->       List[str]:
         lowerCAmelCase__		= Image.open(Path(get_tests_dir("fixtures/tests_samples/COCO"   )   ) / "000000039769.png"   )
         lowerCAmelCase__		= self.tool(SCREAMING_SNAKE_CASE__   )
         self.assertEqual(SCREAMING_SNAKE_CASE__   ,	"two cats sleeping on a couch"   )


    def    a      (       self     :     List[str]   )      ->       int:
         lowerCAmelCase__		= Image.open(Path(get_tests_dir("fixtures/tests_samples/COCO"   )   ) / "000000039769.png"   )
         lowerCAmelCase__		= self.remote_tool(SCREAMING_SNAKE_CASE__   )
         self.assertEqual(SCREAMING_SNAKE_CASE__   ,	"two cats sleeping on a couch"   )


    def    a      (       self     :     Any   )      ->       Any:
         lowerCAmelCase__		= Image.open(Path(get_tests_dir("fixtures/tests_samples/COCO"   )   ) / "000000039769.png"   )
         lowerCAmelCase__		= self.tool(image=SCREAMING_SNAKE_CASE__   )
         self.assertEqual(SCREAMING_SNAKE_CASE__   ,	"two cats sleeping on a couch"   )


    def    a      (       self     :     Dict   )      ->       Any:
         lowerCAmelCase__		= Image.open(Path(get_tests_dir("fixtures/tests_samples/COCO"   )   ) / "000000039769.png"   )
         lowerCAmelCase__		= self.remote_tool(image=SCREAMING_SNAKE_CASE__   )
         self.assertEqual(SCREAMING_SNAKE_CASE__   ,	"two cats sleeping on a couch"   )
