
"""simple docstring"""




from math import floor, sqrt

def   UpperCamelCase_  (		SCREAMING_SNAKE_CASE_			):
					SCREAMING_SNAKE_CASE				=	0.0
					SCREAMING_SNAKE_CASE				=	1.0
					SCREAMING_SNAKE_CASE				=	int(sqrt(SCREAMING_SNAKE_CASE_			)			)
					SCREAMING_SNAKE_CASE				=	root
					SCREAMING_SNAKE_CASE				=	0
					while integer_part != 2 * root:
										SCREAMING_SNAKE_CASE				=	denominator * integer_part - numerator
										SCREAMING_SNAKE_CASE				=	(n - numerator**2) / denominator
										SCREAMING_SNAKE_CASE				=	int((root + numerator) / denominator			)
										period += 1
					return period

def   UpperCamelCase_  (		SCREAMING_SNAKE_CASE_ = 1_0_0_0_0			):
					SCREAMING_SNAKE_CASE				=	0
					for i in range(2,     n + 1			):
										SCREAMING_SNAKE_CASE				=	sqrt(SCREAMING_SNAKE_CASE_			)
										if sr - floor(SCREAMING_SNAKE_CASE_			) != 0 and continuous_fraction_period(SCREAMING_SNAKE_CASE_			) % 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


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

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

try:
							if not is_vision_available():
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							pass
else:
							UpperCamelCase_	       =   ["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

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





