

from collections import OrderedDict
from dataclasses import fields
from typing import Any, Tuple

import numpy as np

from .import_utils import is_torch_available





def  _snake_case		(snake_case_					:     Optional[Any]  )							->		Optional[Any]:
  if is_torch_available():
    import torch

    if isinstance(snake_case_    ,       torch.Tensor  ):
      return True

  return isinstance(snake_case_    ,       np.ndarray  )







class      lowerCamelCase_ (			_lowerCAmelCase):




 def     a       (			self							):
   __UpperCAmelCase	:  Dict		=     fields(self							)

   # Safety and consistency checks
   if not len(_UpperCAmelCase							):
     raise ValueError(F"{self.__class__.__name__} has no fields."							)

   __UpperCAmelCase	:  int		=     getattr(self  ,  class_fields[0].name							)
   __UpperCAmelCase	:  Union[str, Any]		=     all(getattr(self  ,  field.name							) is None for field in class_fields[1:]							)

   if other_fields_are_none and isinstance(_UpperCAmelCase  ,  _UpperCAmelCase							):
     for key, value in first_field.items():
       __UpperCAmelCase	:  str		=     value
   else:
     for field in class_fields:
       __UpperCAmelCase	:  Optional[Any]		=     getattr(self  ,  field.name							)
       if v is not None:
         __UpperCAmelCase	:  Optional[Any]		=     v




 def __delitem__(			self  ,  *_UpperCAmelCase  ,  **_UpperCAmelCase							):
   raise Exception(F"You cannot use ``__delitem__`` on a {self.__class__.__name__} instance."							)




 def     a       (			self  ,  *_UpperCAmelCase  ,  **_UpperCAmelCase							):
   raise Exception(F"You cannot use ``setdefault`` on a {self.__class__.__name__} instance."							)




 def     a       (			self  ,  *_UpperCAmelCase  ,  **_UpperCAmelCase							):
   raise Exception(F"You cannot use ``pop`` on a {self.__class__.__name__} instance."							)




 def     a       (			self  ,  *_UpperCAmelCase  ,  **_UpperCAmelCase							):
   raise Exception(F"You cannot use ``update`` on a {self.__class__.__name__} instance."							)




 def __getitem__(			self  ,  _UpperCAmelCase							):
   if isinstance(_UpperCAmelCase  ,  _UpperCAmelCase							):
     __UpperCAmelCase	:  List[Any]		=     dict(self.items()							)
     return inner_dict[k]
   else:
     return self.to_tuple()[k]




 def __setattr__(			self  ,  _UpperCAmelCase  ,  _UpperCAmelCase							):
   if name in self.keys() and value is not None:
     # Don't call self.__setitem__ to avoid recursion errors
     super().__setitem__(_UpperCAmelCase  ,  _UpperCAmelCase							)
   super().__setattr__(_UpperCAmelCase  ,  _UpperCAmelCase							)




 def __setitem__(			self  ,  _UpperCAmelCase  ,  _UpperCAmelCase							):
   # Will raise a KeyException if needed
   super().__setitem__(_UpperCAmelCase  ,  _UpperCAmelCase							)
   # Don't call self.__setattr__ to avoid recursion errors
   super().__setattr__(_UpperCAmelCase  ,  _UpperCAmelCase							)




 def     a       (			self							):
   return tuple(self[k] for k in self.keys()							)









from math import floor, sqrt

def 		snake_case_   (				lowercase__     :    int     ):






				'''simple docstring'''






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

def 		snake_case_   (				lowercase__     :    int = 1_00_00     ):






				'''simple docstring'''






				_lowerCAmelCase  						=0
				for i in range(2       ,     n + 1     ):
								_lowerCAmelCase  						=sqrt(lowercase__     )
								if sr - floor(lowercase__     ) != 0 and continuous_fraction_period(lowercase__     ) % 2 == 1:
												count_odd_periods += 1
				return count_odd_periods


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

