
"""simple docstring"""

from ..utils import deprecate
from .attention_processor import (  # noqa: F401
    Attention,
    AttentionProcessor,
    AttnAddedKVProcessor,
    AttnProcessor2_0,
    LoRAAttnProcessor,
    LoRALinearLayer,
    LoRAXFormersAttnProcessor,
    SlicedAttnAddedKVProcessor,
    SlicedAttnProcessor,
    XFormersAttnProcessor,
)
from .attention_processor import AttnProcessor as AttnProcessorRename  # noqa: F401


deprecate(
    '''cross_attention''',
    '''0.20.0''',
    '''Importing from cross_attention is deprecated. Please import from diffusers.models.attention_processor instead.''',
    standard_warn=False,
)


SCREAMING_SNAKE_CASE_			    =  AttentionProcessor
class    _UpperCAmelCase							(						SCREAMING_SNAKE_CASE_							):




      def __init__(							self      ,				*lowercase_      ,				**lowercase_							)  ->    Dict:
          UpperCAmelCase  	=    F"{self.__class__.__name__} is deprecated and will be removed in `0.20.0`. Please use `from diffusers.models.attention_processor import {''.join(self.__class__.__name__.split('Cross'							)							)} instead."
          deprecate('cross_attention'      ,				'0.20.0'      ,				lowercase_      ,				standard_warn=lowercase_							)
          super().__init__(*lowercase_      ,				**lowercase_							)

class    _UpperCAmelCase							(						SCREAMING_SNAKE_CASE_							):




      def __init__(							self      ,				*lowercase_      ,				**lowercase_							)  ->    Union[str, Any]:
          UpperCAmelCase  	=    F"{self.__class__.__name__} is deprecated and will be removed in `0.20.0`. Please use `from diffusers.models.attention_processor import {''.join(self.__class__.__name__.split('Cross'							)							)} instead."
          deprecate('cross_attention'      ,				'0.20.0'      ,				lowercase_      ,				standard_warn=lowercase_							)
          super().__init__(*lowercase_      ,				**lowercase_							)

class    _UpperCAmelCase							(						SCREAMING_SNAKE_CASE_							):




      def __init__(							self      ,				*lowercase_      ,				**lowercase_							)  ->    Optional[int]:
          UpperCAmelCase  	=    F"{self.__class__.__name__} is deprecated and will be removed in `0.20.0`. Please use `from diffusers.models.attention_processor import {''.join(self.__class__.__name__.split('Cross'							)							)} instead."
          deprecate('cross_attention'      ,				'0.20.0'      ,				lowercase_      ,				standard_warn=lowercase_							)
          super().__init__(*lowercase_      ,				**lowercase_							)

class    _UpperCAmelCase							(						SCREAMING_SNAKE_CASE_							):




      def __init__(							self      ,				*lowercase_      ,				**lowercase_							)  ->    Any:
          UpperCAmelCase  	=    F"{self.__class__.__name__} is deprecated and will be removed in `0.20.0`. Please use `from diffusers.models.attention_processor import {''.join(self.__class__.__name__.split('Cross'							)							)} instead."
          deprecate('cross_attention'      ,				'0.20.0'      ,				lowercase_      ,				standard_warn=lowercase_							)
          super().__init__(*lowercase_      ,				**lowercase_							)

class    _UpperCAmelCase							(						SCREAMING_SNAKE_CASE_							):




      def __init__(							self      ,				*lowercase_      ,				**lowercase_							)  ->    Dict:
          UpperCAmelCase  	=    F"{self.__class__.__name__} is deprecated and will be removed in `0.20.0`. Please use `from diffusers.models.attention_processor import {''.join(self.__class__.__name__.split('Cross'							)							)} instead."
          deprecate('cross_attention'      ,				'0.20.0'      ,				lowercase_      ,				standard_warn=lowercase_							)
          super().__init__(*lowercase_      ,				**lowercase_							)

class    _UpperCAmelCase							(						SCREAMING_SNAKE_CASE_							):




      def __init__(							self      ,				*lowercase_      ,				**lowercase_							)  ->    int:
          UpperCAmelCase  	=    F"{self.__class__.__name__} is deprecated and will be removed in `0.20.0`. Please use `from diffusers.models.attention_processor import {''.join(self.__class__.__name__.split('Cross'							)							)} instead."
          deprecate('cross_attention'      ,				'0.20.0'      ,				lowercase_      ,				standard_warn=lowercase_							)
          super().__init__(*lowercase_      ,				**lowercase_							)

class    _UpperCAmelCase							(						SCREAMING_SNAKE_CASE_							):




      def __init__(							self      ,				*lowercase_      ,				**lowercase_							)  ->    Dict:
          UpperCAmelCase  	=    F"{self.__class__.__name__} is deprecated and will be removed in `0.20.0`. Please use `from diffusers.models.attention_processor import {''.join(self.__class__.__name__.split('Cross'							)							)} instead."
          deprecate('cross_attention'      ,				'0.20.0'      ,				lowercase_      ,				standard_warn=lowercase_							)
          super().__init__(*lowercase_      ,				**lowercase_							)

class    _UpperCAmelCase							(						SCREAMING_SNAKE_CASE_							):




      def __init__(							self      ,				*lowercase_      ,				**lowercase_							)  ->    List[str]:
          UpperCAmelCase  	=    F"{self.__class__.__name__} is deprecated and will be removed in `0.20.0`. Please use `from diffusers.models.attention_processor import {''.join(self.__class__.__name__.split('Cross'							)							)} instead."
          deprecate('cross_attention'      ,				'0.20.0'      ,				lowercase_      ,				standard_warn=lowercase_							)
          super().__init__(*lowercase_      ,				**lowercase_							)





"""simple docstring"""

from math import floor, sqrt




def 			lowercase__  (    lowerCAmelCase :    int       )       ->					int:






    """simple docstring"""




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




def 			lowercase__  (    lowerCAmelCase :    int = 10_000       )       ->					int:






    """simple docstring"""




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


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



