
'''simple docstring'''







import torch
import torch.nn.functional as F

from diffusers import VQDiffusionScheduler

from .test_schedulers import SchedulerCommonTest
class  SCREAMING_SNAKE_CASE__       (  __UpperCamelCase   ):
	lowercase__	    =							(VQDiffusionScheduler,)
	def __lowerCamelCase    (				self  ,    **__UpperCamelCase			):



					'''simple docstring'''






					__a       :     Optional[Any]								=	{
					    """num_vec_classes""": 4097,
					    """num_train_timesteps""": 100,
					}

					config.update(**UpperCAmelCase_			)
					return config
	def __lowerCamelCase    (				self  ,    __UpperCamelCase			):



					'''simple docstring'''






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

					__a       :     List[str]								=	torch.randint(0  ,    UpperCAmelCase_  ,    (batch_size, height * width)			)

					return sample
	@property
	def __lowerCamelCase    (				self			):



					'''simple docstring'''






					assert False
	def __lowerCamelCase    (				self  ,    __UpperCamelCase			):



					'''simple docstring'''






					def model(__UpperCamelCase  ,    __UpperCamelCase  ,    *__UpperCamelCase			):
									__a       :     Union[str, Any]								=	sample.shape
									__a       :     Optional[int]								=	torch.rand((batch_size, num_vec_classes - 1, num_latent_pixels)			)
									__a       :     int								=	F.log_softmax(logits.double()  ,    dim=1			).float()
									return return_value

					return model
	def __lowerCamelCase    (				self			):



					'''simple docstring'''






					for timesteps in [2, 5, 100, 1000]:
									self.check_over_configs(num_train_timesteps=UpperCAmelCase_			)
	def __lowerCamelCase    (				self			):



					'''simple docstring'''






					for num_vec_classes in [5, 100, 1000, 4000]:
									self.check_over_configs(num_vec_classes=UpperCAmelCase_			)
	def __lowerCamelCase    (				self			):



					'''simple docstring'''






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

	def __lowerCamelCase    (				self			):



					'''simple docstring'''






					pass




"""simple docstring"""







from math import floor, sqrt


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


def  __SCREAMING_SNAKE_CASE (  __UpperCAmelCase = 10000      ):
		_lowercase				: List[str]     =   0
		for i in range(2   ,				n + 1      ):
				_lowercase				: Dict     =   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()))}')



