

from math import floor, sqrt




def        __UpperCamelCase     (      _A					:							int		)				->int:



							"""simple docstring"""
							lowerCamelCase_								=0.0
							lowerCamelCase_								=1.0
							lowerCamelCase_								=int(sqrt(_A		)		)
							lowerCamelCase_								=root
							lowerCamelCase_								=0
							while integer_part != 2 * root:
														lowerCamelCase_								=denominator * integer_part - numerator
														lowerCamelCase_								=(n - numerator**2) / denominator
														lowerCamelCase_								=int((root + numerator) / denominator		)
														period += 1
							return period




def        __UpperCamelCase     (      _A					:							int = 10000		)				->int:



							"""simple docstring"""
							lowerCamelCase_								=0
							for i in range(2      ,  n + 1		):
														lowerCamelCase_								=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

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_torch_available,
    is_vision_available,
)


__A	:   Optional[int]	=					{
    'configuration_mobilevitv2': [
        'MOBILEVITV2_PRETRAINED_CONFIG_ARCHIVE_MAP',
        'MobileViTV2Config',
        'MobileViTV2OnnxConfig',
    ],
}


try:
	if not is_torch_available():
		raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
	pass
else:
	__A	:   Tuple	=					[
	    'MOBILEVITV2_PRETRAINED_MODEL_ARCHIVE_LIST',
	    'MobileViTV2ForImageClassification',
	    'MobileViTV2ForSemanticSegmentation',
	    'MobileViTV2Model',
	    'MobileViTV2PreTrainedModel',
	]

if TYPE_CHECKING:
	from .configuration_mobilevitva import (
	    MOBILEVITV2_PRETRAINED_CONFIG_ARCHIVE_MAP,
	    MobileViTVaConfig,
	    MobileViTVaOnnxConfig,
	)

	try:
		if not is_torch_available():
			raise OptionalDependencyNotAvailable()
	except OptionalDependencyNotAvailable:
		pass
	else:
		from .modeling_mobilevitva import (
		    MOBILEVITV2_PRETRAINED_MODEL_ARCHIVE_LIST,
		    MobileViTVaForImageClassification,
		    MobileViTVaForSemanticSegmentation,
		    MobileViTVaModel,
		    MobileViTVaPreTrainedModel,
		)

else:
	import sys

	__A	:   List[str]	=					_LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)
