




from math import floor, sqrt

def 					A				(				_SCREAMING_SNAKE_CASE   )     ->			int:
       lowerCamelCase       :				Dict      			= 0.0
       lowerCamelCase       :				Tuple      			= 1.0
       lowerCamelCase       :				Any      			= int(sqrt(_SCREAMING_SNAKE_CASE   )   )
       lowerCamelCase       :				Optional[int]      			= root
       lowerCamelCase       :				str      			= 0
       while integer_part != 2 * root:
              lowerCamelCase       :				Any      			= denominator * integer_part - numerator
              lowerCamelCase       :				str      			= (n - numerator**2) / denominator
              lowerCamelCase       :				Any      			= int((root + numerator) / denominator   )
              period += 1
       return period

def 					A				(				_SCREAMING_SNAKE_CASE = 1_0000   )     ->			int:
       lowerCamelCase       :				List[str]      			= 0
       for i in range(2			,n + 1   ):
              lowerCamelCase       :				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()))}''')












import numpy as np

def 					A				(				_SCREAMING_SNAKE_CASE   )     ->			str:
       lowerCamelCase			,				lowerCamelCase       :				Dict      			= a.shape
       lowerCamelCase       :				Union[str, Any]      			= min(_SCREAMING_SNAKE_CASE			,_SCREAMING_SNAKE_CASE   )
       lowerCamelCase       :				Union[str, Any]      			= np.eye(_SCREAMING_SNAKE_CASE   )
       lowerCamelCase       :				List[Any]      			= a.copy()

       for k in range(t - 1   ):
              # select a column of modified matrix A':
              lowerCamelCase       :				Optional[Any]      			= r[k:, [k]]
              # construct first basis vector
              lowerCamelCase       :				Union[str, Any]      			= np.zeros_like(_SCREAMING_SNAKE_CASE   )
              lowerCamelCase       :				int      			= 1.0
              # determine scaling factor
              lowerCamelCase       :				Any      			= np.linalg.norm(_SCREAMING_SNAKE_CASE   )
              # construct vector v for Householder reflection
              lowerCamelCase       :				List[str]      			= x + np.sign(x[0]   ) * alpha * ea
              v /= np.linalg.norm(_SCREAMING_SNAKE_CASE   )

              # construct the Householder matrix
              lowerCamelCase       :				List[Any]      			= np.eye(m - k   ) - 2.0 * v @ v.T
              # pad with ones and zeros as necessary
              lowerCamelCase       :				Union[str, Any]      			= np.block([[np.eye(_SCREAMING_SNAKE_CASE   ), np.zeros((k, m - k)   )], [np.zeros((m - k, k)   ), q_k]]   )

              lowerCamelCase       :				Any      			= q @ q_k.T
              lowerCamelCase       :				List[Any]      			= q_k @ r

       return q, r


if __name__ == "__main__":
       import doctest

       doctest.testmod()






