



"""simple docstring"""







import torch
import torch.nn.functional as F

from diffusers import VQDiffusionScheduler

from .test_schedulers import SchedulerCommonTest





class   UpperCamelCase	(     snake_case       ):




	"""simple docstring"""
	SCREAMING_SNAKE_CASE_							:       int						       =  (VQDiffusionScheduler,)






	def    lowerCamelCase__					(     self				,**UpperCAmelCase_   ):
			_lowercase				: Optional[Any]     =   {
			    """num_vec_classes""": 40_97,
			    """num_train_timesteps""": 1_00,
			}

			config.update(**UpperCAmelCase_   )
			return config






	def    lowerCamelCase__					(     self				,UpperCAmelCase_   ):
			_lowercase				: Optional[int]     =   4
			_lowercase				: str     =   8
			_lowercase				: Union[str, Any]     =   8

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

			return sample






	@property
	def    lowerCamelCase__					(     self   ):
			assert False






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

			return model






	def    lowerCamelCase__					(     self   ):
			for timesteps in [2, 5, 1_00, 10_00]:
					self.check_over_configs(num_train_timesteps=UpperCAmelCase_   )






	def    lowerCamelCase__					(     self   ):
			for num_vec_classes in [5, 1_00, 10_00, 40_00]:
					self.check_over_configs(num_vec_classes=UpperCAmelCase_   )






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






	def    lowerCamelCase__					(     self   ):
			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()))}')



