
import importlib
import sys
from argparse import REMAINDER, ArgumentParser
from pathlib import Path

import torch_xla.distributed.xla_multiprocessing as xmp
def       UpperCAmelCase__							(    ):


					'''simple docstring'''

					lowerCAmelCase						:   Optional[int]							=       ArgumentParser(
					    description=(
					        '''PyTorch TPU distributed training launch helper utility that will spawn up multiple distributed processes'''
					    )					)

					# Optional arguments for the launch helper
					parser.add_argument('''--num_cores'''							,					type=__magic_name__							,					default=1							,					help='''Number of TPU cores to use (1 or 8).'''					)

					# positional
					parser.add_argument(
					    '''training_script'''							,					type=__magic_name__							,					help=(
					        '''The full path to the single TPU training '''
					        '''program/script to be launched in parallel, '''
					        '''followed by all the arguments for the '''
					        '''training script'''
					    )							,					)

					# rest from the training program
					parser.add_argument('''training_script_args'''							,					nargs=__magic_name__					)

					return parser.parse_args()
def       UpperCAmelCase__							(    ):


					'''simple docstring'''

					lowerCAmelCase						:   Optional[Any]							=       parse_args()

					# Import training_script as a module.
					lowerCAmelCase						:   str							=       Path(args.training_script					)
					sys.path.append(str(script_fpath.parent.resolve()					)					)
					lowerCAmelCase						:   int							=       script_fpath.stem
					lowerCAmelCase						:   int							=       importlib.import_module(__magic_name__					)

					# Patch sys.argv
					lowerCAmelCase						:   Any							=       [args.training_script] + args.training_script_args + ['''--tpu_num_cores''', str(args.num_cores					)]

					xmp.spawn(mod._mp_fn							,					args=()							,					nprocs=args.num_cores					)


if __name__ == "__main__":
		main()


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()))}""")
