
from math import floor, sqrt
def 					lowerCAmelCase__     (    SCREAMING_SNAKE_CASE_	)							->						int:
			lowerCAmelCase__ : List[str]   =						0.0
			lowerCAmelCase__ : Dict   =						1.0
			lowerCAmelCase__ : Optional[int]   =						int(sqrt(SCREAMING_SNAKE_CASE_	)	)
			lowerCAmelCase__ : Any   =						root
			lowerCAmelCase__ : Tuple   =						0
			while integer_part != 2 * root:
						lowerCAmelCase__ : List[Any]   =						denominator * integer_part - numerator
						lowerCAmelCase__ : Optional[int]   =						(n - numerator**2) / denominator
						lowerCAmelCase__ : str   =						int((root + numerator) / denominator	)
						period += 1
			return period
def 					lowerCAmelCase__     (    SCREAMING_SNAKE_CASE_ = 10_000	)							->						int:
			lowerCAmelCase__ : Any   =						0
			for i in range(2			,				n + 1	):
						lowerCAmelCase__ : List[str]   =						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_flax_available,
    is_tf_available,
    is_torch_available,
)


lowerCamelCase__        =						{"""configuration_regnet""": ["""REGNET_PRETRAINED_CONFIG_ARCHIVE_MAP""", """RegNetConfig"""]}

try:
					if not is_torch_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					lowerCamelCase__        =						[
					    """REGNET_PRETRAINED_MODEL_ARCHIVE_LIST""",
					    """RegNetForImageClassification""",
					    """RegNetModel""",
					    """RegNetPreTrainedModel""",
					]

try:
					if not is_tf_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					lowerCamelCase__        =						[
					    """TF_REGNET_PRETRAINED_MODEL_ARCHIVE_LIST""",
					    """TFRegNetForImageClassification""",
					    """TFRegNetModel""",
					    """TFRegNetPreTrainedModel""",
					]

try:
					if not is_flax_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					lowerCamelCase__        =						[
					    """FlaxRegNetForImageClassification""",
					    """FlaxRegNetModel""",
					    """FlaxRegNetPreTrainedModel""",
					]


if TYPE_CHECKING:
					from .configuration_regnet import REGNET_PRETRAINED_CONFIG_ARCHIVE_MAP, RegNetConfig

					try:
										if not is_torch_available():
															raise OptionalDependencyNotAvailable()
					except OptionalDependencyNotAvailable:
										pass
					else:
										from .modeling_regnet import (
										    REGNET_PRETRAINED_MODEL_ARCHIVE_LIST,
										    RegNetForImageClassification,
										    RegNetModel,
										    RegNetPreTrainedModel,
										)

					try:
										if not is_tf_available():
															raise OptionalDependencyNotAvailable()
					except OptionalDependencyNotAvailable:
										pass
					else:
										from .modeling_tf_regnet import (
										    TF_REGNET_PRETRAINED_MODEL_ARCHIVE_LIST,
										    TFRegNetForImageClassification,
										    TFRegNetModel,
										    TFRegNetPreTrainedModel,
										)

					try:
										if not is_flax_available():
															raise OptionalDependencyNotAvailable()
					except OptionalDependencyNotAvailable:
										pass
					else:
										from .modeling_flax_regnet import (
										    FlaxRegNetForImageClassification,
										    FlaxRegNetModel,
										    FlaxRegNetPreTrainedModel,
										)


else:
					import sys

					lowerCamelCase__        =						_LazyModule(__name__, globals()["""__file__"""], _import_structure)