

from math import floor, sqrt






def        lowerCamelCase_  (				UpperCAmelCase_				:  int						)    ->					int:




	'''simple docstring'''




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






def        lowerCamelCase_  (				UpperCAmelCase_				:  int = 1_0_0_0_0						)    ->					int:




	'''simple docstring'''




	_UpperCamelCase :		Union[str, Any]								=    0
	for i in range(2				,							n + 1						):
		_UpperCamelCase :		Optional[int]								=    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()))}')







from typing import TYPE_CHECKING

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


lowerCAmelCase__             =		{"""configuration_vit_hybrid""": ["""VIT_HYBRID_PRETRAINED_CONFIG_ARCHIVE_MAP""", """ViTHybridConfig"""]}

try:
							if not is_torch_available():
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							pass
else:
							lowerCAmelCase__             =		[
							    """VIT_HYBRID_PRETRAINED_MODEL_ARCHIVE_LIST""",
							    """ViTHybridForImageClassification""",
							    """ViTHybridModel""",
							    """ViTHybridPreTrainedModel""",
							]

try:
							if not is_vision_available():
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							pass
else:
							lowerCAmelCase__             =		["""ViTHybridImageProcessor"""]


if TYPE_CHECKING:
							from .configuration_vit_hybrid import VIT_HYBRID_PRETRAINED_CONFIG_ARCHIVE_MAP, ViTHybridConfig

							try:
														if not is_torch_available():
																					raise OptionalDependencyNotAvailable()
							except OptionalDependencyNotAvailable:
														pass
							else:
														from .modeling_vit_hybrid import (
														    VIT_HYBRID_PRETRAINED_MODEL_ARCHIVE_LIST,
														    ViTHybridForImageClassification,
														    ViTHybridModel,
														    ViTHybridPreTrainedModel,
														)

							try:
														if not is_vision_available():
																					raise OptionalDependencyNotAvailable()
							except OptionalDependencyNotAvailable:
														pass
							else:
														from .image_processing_vit_hybrid import ViTHybridImageProcessor


else:
							import sys

							lowerCAmelCase__             =		_LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)




