

"""simple docstring"""

from math import floor, sqrt



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



def 			SCREAMING_SNAKE_CASE       (   lowercase__ = 1_0_0_0_0      ) ->	int:
 lowerCAmelCase__      :							Tuple    =							0
 for i in range(2				,				n + 1      ):
  lowerCAmelCase__      :							List[Any]    =							sqrt(lowercase__      )
  if sr - floor(lowercase__      ) != 0 and continuous_fraction_period(lowercase__      ) % 2 == 1:
   count_odd_periods += 1
 return count_odd_periods


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









"""simple docstring"""

import torch
import torch.nn.functional as F

from diffusers import VQDiffusionScheduler

from .test_schedulers import SchedulerCommonTest






class  __a				(	__magic_name__					):





       """simple docstring"""


       __UpperCamelCase				:			Optional[int]          =	(VQDiffusionScheduler,)






       def  SCREAMING_SNAKE_CASE_  (      self ,				**snake_case      ):





        """simple docstring"""

        lowerCAmelCase__      :							str    =							{
            "num_vec_classes": 4_097,
            "num_train_timesteps": 100,
        }

        config.update(**snake_case      )
        return config






       def  SCREAMING_SNAKE_CASE_  (      self ,				snake_case      ):





        """simple docstring"""

        lowerCAmelCase__      :							Optional[int]    =							4
        lowerCAmelCase__      :							Optional[Any]    =							8
        lowerCAmelCase__      :							Union[str, Any]    =							8

        lowerCAmelCase__      :							Optional[Any]    =							torch.randint(0 ,				snake_case ,				(batch_size, height * width)      )

        return sample






       @property
       def  SCREAMING_SNAKE_CASE_  (      self      ):





        """simple docstring"""

        assert False






       def  SCREAMING_SNAKE_CASE_  (      self ,				snake_case      ):





        """simple docstring"""

        def model(snake_case ,				snake_case ,				*snake_case      ):
         lowerCAmelCase__ ,	lowerCAmelCase__      :							str    =							sample.shape
         lowerCAmelCase__      :							Dict    =							torch.rand((batch_size, num_vec_classes - 1, num_latent_pixels)      )
         lowerCAmelCase__      :							int    =							F.log_softmax(logits.double() ,				dim=1      ).float()
         return return_value

        return model






       def  SCREAMING_SNAKE_CASE_  (      self      ):





        """simple docstring"""

        for timesteps in [2, 5, 100, 1_000]:
         self.check_over_configs(num_train_timesteps=snake_case      )






       def  SCREAMING_SNAKE_CASE_  (      self      ):





        """simple docstring"""

        for num_vec_classes in [5, 100, 1_000, 4_000]:
         self.check_over_configs(num_vec_classes=snake_case      )






       def  SCREAMING_SNAKE_CASE_  (      self      ):





        """simple docstring"""

        for t in [0, 50, 99]:
         self.check_over_forward(time_step=snake_case      )






       def  SCREAMING_SNAKE_CASE_  (      self      ):





        """simple docstring"""

        pass






