code: 
  """simple docstring"""
  
  
  
  
  
  from math import floor, sqrt
  
  
  
  
  
  
  
  def 			__a  (	__lowerCamelCase						):
     UpperCAmelCase_      :      Optional[Any]      =					0.0
     UpperCAmelCase_      :      Dict      =					1.0
     UpperCAmelCase_      :      Dict      =					int(sqrt(__lowerCamelCase						)						)
     UpperCAmelCase_      :      List[str]      =					root
     UpperCAmelCase_      :      Tuple      =					0
     while integer_part != 2 * root:
        UpperCAmelCase_      :      int      =					denominator * integer_part - numerator
        UpperCAmelCase_      :      Dict      =					(n - numerator**2) / denominator
        UpperCAmelCase_      :      str      =					int((root + numerator) / denominator						)
        period += 1
     return period
  
  
  
  
  
  
  
  def 			__a  (	__lowerCamelCase = 1_0000						):
     UpperCAmelCase_      :      Dict      =					0
     for i in range(2,	n + 1						):
        UpperCAmelCase_      :      str      =					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()))}""")
  
  
  
style_context: 
  """simple docstring"""
  
  
  
  
  
  def 			__a  (	__lowerCamelCase = 1000						):
     UpperCAmelCase_      :      List[Any]      =					0
     UpperCAmelCase_      :      List[str]      =					(n - 1) // 3
     total += ((terms) * (6 + (terms - 1) * 3)) // 2  # total of an A.P.
     UpperCAmelCase_      :      Any      =					(n - 1) // 5
     total += ((terms) * (10 + (terms - 1) * 5)) // 2
     UpperCAmelCase_      :      Optional[int]      =					(n - 1) // 15
     total -= ((terms) * (30 + (terms - 1) * 15)) // 2
     return total
  
  
  if __name__ == "__main__":
      print(f"""{solution() = }""")
  
  
  