






def _a				( SCREAMING_SNAKE_CASE	:    Dict					,      SCREAMING_SNAKE_CASE	:    List[Any]	)					->					int:

 """simple docstring"""






 __lowerCAmelCase:     Optional[Any]     			=   0
 for ele in arr:
  total_sum += product_sum(SCREAMING_SNAKE_CASE__					,      depth + 1	) if isinstance(SCREAMING_SNAKE_CASE__					,      SCREAMING_SNAKE_CASE__	) else ele
 return total_sum * depth







def _a				( SCREAMING_SNAKE_CASE	:    Union[str, Any]	)					->					int:

 """simple docstring"""






 return product_sum(SCREAMING_SNAKE_CASE__					,      1	)


if __name__ == "__main__":
  import doctest

  doctest.testmod()








from math import floor, sqrt







def _a				( SCREAMING_SNAKE_CASE	:    int	)					->					int:

 """simple docstring"""






 __lowerCAmelCase:     Optional[int]     			=   0.0
 __lowerCAmelCase:     Any     			=   1.0
 __lowerCAmelCase:     List[str]     			=   int(sqrt(SCREAMING_SNAKE_CASE	)	)
 __lowerCAmelCase:     Union[str, Any]     			=   root
 __lowerCAmelCase:     List[str]     			=   0
 while integer_part != 2 * root:
  __lowerCAmelCase:     List[str]     			=   denominator * integer_part - numerator
  __lowerCAmelCase:     Optional[int]     			=   (n - numerator**2) / denominator
  __lowerCAmelCase:     Union[str, Any]     			=   int((root + numerator) / denominator	)
  period += 1
 return period







def _a				( SCREAMING_SNAKE_CASE	:    int = 1_00_00	)					->					int:

 """simple docstring"""






 __lowerCAmelCase:     Optional[int]     			=   0
 for i in range(2					,      n + 1	):
  __lowerCAmelCase:     List[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()))}")





