






from __future__ import annotations







def _a				( SCREAMING_SNAKE_CASE	:    list					,      SCREAMING_SNAKE_CASE	:    list	)					->					list:

 """simple docstring"""






 __lowerCAmelCase:     str     			=   [None] * (len(SCREAMING_SNAKE_CASE	) + len(SCREAMING_SNAKE_CASE	))

 __lowerCAmelCase:     List[Any]     			=   0  # pointer to current index for left Half
 __lowerCAmelCase:     Optional[Any]     			=   0  # pointer to current index for the right Half
 __lowerCAmelCase:     int     			=   0  # pointer to current index for the sorted array Half

 while pointera < len(SCREAMING_SNAKE_CASE	) and pointera < len(SCREAMING_SNAKE_CASE	):
  if left_half[pointera] < right_half[pointera]:
   __lowerCAmelCase:     str     			=   left_half[pointera]
   pointera += 1
   index += 1
  else:
   __lowerCAmelCase:     List[Any]     			=   right_half[pointera]
   pointera += 1
   index += 1
 while pointera < len(SCREAMING_SNAKE_CASE	):
  __lowerCAmelCase:     Tuple     			=   left_half[pointera]
  pointera += 1
  index += 1

 while pointera < len(SCREAMING_SNAKE_CASE	):
  __lowerCAmelCase:     Dict     			=   right_half[pointera]
  pointera += 1
  index += 1

 return sorted_array







def _a				( SCREAMING_SNAKE_CASE	:    list	)					->					list:

 """simple docstring"""






 if len(SCREAMING_SNAKE_CASE	) <= 1:
  return array
 # the actual formula to calculate the middle element = left + (right - left) // 2
 # this avoids integer overflow in case of large N
 __lowerCAmelCase:     Dict     			=   0 + (len(SCREAMING_SNAKE_CASE	) - 0) // 2

 # Split the array into halves till the array length becomes equal to One
 # merge the arrays of single length returned by mergeSort function and
 # pass them into the merge arrays function which merges the array
 __lowerCAmelCase:     Dict     			=   array[:middle]
 __lowerCAmelCase:     List[Any]     			=   array[middle:]

 return merge(merge_sort(SCREAMING_SNAKE_CASE	)					,      merge_sort(SCREAMING_SNAKE_CASE	)	)


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()))}")





