code: 
  
  
  
  from math import floor, sqrt
  
  
  
  
  
  
  def 			__lowercase     (				a__     )       ->				int:
  							__SCREAMING_SNAKE_CASE								=      0.0
  							__SCREAMING_SNAKE_CASE								=      1.0
  							__SCREAMING_SNAKE_CASE								=      int(sqrt(a__     )     )
  							__SCREAMING_SNAKE_CASE								=      root
  							__SCREAMING_SNAKE_CASE								=      0
  							while integer_part != 2 * root:
  														__SCREAMING_SNAKE_CASE								=      denominator * integer_part - numerator
  														__SCREAMING_SNAKE_CASE								=      (n - numerator**2) / denominator
  														__SCREAMING_SNAKE_CASE								=      int((root + numerator) / denominator     )
  														period += 1
  							return period
  
  
  
  
  
  
  def 			__lowercase     (				a__ = 1_00_00     )       ->				int:
  							__SCREAMING_SNAKE_CASE								=      0
  							for i in range(2							,     n + 1     ):
  														__SCREAMING_SNAKE_CASE								=      sqrt(a__     )
  														if sr - floor(a__     ) != 0 and continuous_fraction_period(a__     ) % 2 == 1:
  																					count_odd_periods += 1
  							return count_odd_periods
  
  
  if __name__ == "__main__":
  			print(F'''{solution(int(input().strip()))}''')
  
  
  
  
  
  
  
style_context: 
  
  
  
  from __future__ import annotations
  
  class      UpperCAmelCase_						:
  
  						'''simple docstring'''
  
  
  
  
  						def __init__(					self   ,							_A	):
  
  
  
  
  
  
  
  													'''simple docstring'''
  
  													__SCREAMING_SNAKE_CASE								=      value
  													__SCREAMING_SNAKE_CASE								=      None
  													__SCREAMING_SNAKE_CASE								=      None
  
  
  
  
  
  
  
  class      UpperCAmelCase_						:
  
  						'''simple docstring'''
  
  
  
  
  						UpperCamelCase__    :				int
  
  
  
  
  
  
  						def __init__(					self	):
  
  
  
  
  
  
  
  													'''simple docstring'''
  
  													__SCREAMING_SNAKE_CASE								=      0
  
  
  
  
  
  
  						def  _A			(					self   ,							_A   ,							_A	):
  
  
  
  
  
  
  
  													'''simple docstring'''
  
  													if node is None:
  																				return
  
  													if path_sum == self.target:
  																				self.paths += 1
  
  													if node.left:
  																				self.depth_first_search(node.left   ,							path_sum + node.left.value	)
  													if node.right:
  																				self.depth_first_search(node.right   ,							path_sum + node.right.value	)
  
  
  
  
  
  
  						def  _A			(					self   ,							_A   ,							_A = None	):
  
  
  
  
  
  
  
  													'''simple docstring'''
  
  													if node is None:
  																				return 0
  													if target is not None:
  																				__SCREAMING_SNAKE_CASE								=      target
  
  													self.depth_first_search(_A   ,							node.value	)
  													self.path_sum(node.left	)
  													self.path_sum(node.right	)
  
  													return self.paths
  
  
  if __name__ == "__main__":
  			import doctest
  
  			doctest.testmod()
  
  
  
  
  
  
  