
from typing import TYPE_CHECKING

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


__SCREAMING_SNAKE_CASE     :				Any             =       {
    'configuration_align': [
        'ALIGN_PRETRAINED_CONFIG_ARCHIVE_MAP',
        'AlignConfig',
        'AlignTextConfig',
        'AlignVisionConfig',
    ],
    'processing_align': ['AlignProcessor'],
}

try:
		if not is_torch_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		__SCREAMING_SNAKE_CASE     :				Any             =       [
		    'ALIGN_PRETRAINED_MODEL_ARCHIVE_LIST',
		    'AlignModel',
		    'AlignPreTrainedModel',
		    'AlignTextModel',
		    'AlignVisionModel',
		]

if TYPE_CHECKING:
		from .configuration_align import (
		    ALIGN_PRETRAINED_CONFIG_ARCHIVE_MAP,
		    AlignConfig,
		    AlignTextConfig,
		    AlignVisionConfig,
		)
		from .processing_align import AlignProcessor

		try:
				if not is_torch_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .modeling_align import (
				    ALIGN_PRETRAINED_MODEL_ARCHIVE_LIST,
				    AlignModel,
				    AlignPreTrainedModel,
				    AlignTextModel,
				    AlignVisionModel,
				)

else:
		import sys

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


from math import floor, sqrt
def       UpperCAmelCase__							(    __magic_name__  :       int					):


					'''simple docstring'''

					lowerCAmelCase						:   int							=       0.0
					lowerCAmelCase						:   int							=       1.0
					lowerCAmelCase						:   Any							=       int(sqrt(__magic_name__					)					)
					lowerCAmelCase						:   Optional[int]							=       root
					lowerCAmelCase						:   Dict							=       0
					while integer_part != 2 * root:
										lowerCAmelCase						:   str							=       denominator * integer_part - numerator
										lowerCAmelCase						:   Dict							=       (n - numerator**2) / denominator
										lowerCAmelCase						:   str							=       int((root + numerator) / denominator					)
										period += 1
					return period
def       UpperCAmelCase__							(    __magic_name__  :       int = 1_00_00					):


					'''simple docstring'''

					lowerCAmelCase						:   List[str]							=       0
					for i in range(2							,					n + 1					):
										lowerCAmelCase						:   Any							=       sqrt(__magic_name__					)
										if sr - floor(__magic_name__					) != 0 and continuous_fraction_period(__magic_name__					) % 2 == 1:
															count_odd_periods += 1
					return count_odd_periods


if __name__ == "__main__":
		print(f"""{solution(int(input().strip()))}""")
