



'''simple docstring'''

from math import floor, sqrt







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







def     __UpperCamelCase					(				_lowercase = 1_0000       )			->      int:
	_lowercase       :							Dict  	=		0
	for i in range(2,					n + 1       ):
		_lowercase       :							Optional[Any]  	=		sqrt(_lowercase       )
		if sr - floor(_lowercase       ) != 0 and continuous_fraction_period(_lowercase       ) % 2 == 1:
			count_odd_periods += 1
	return count_odd_periods


if __name__ == "__main__":
		print(F'''{solution(int(input().strip()))}''')





'''simple docstring'''

def     __UpperCamelCase					(				_lowercase = 1000       )			->      int:
	_lowercase       :							Dict  	=		0
	_lowercase       :							int  	=		0
	while 1:
		num += 3
		if num >= n:
			break
		total += num
		num += 2
		if num >= n:
			break
		total += num
		num += 1
		if num >= n:
			break
		total += num
		num += 3
		if num >= n:
			break
		total += num
		num += 1
		if num >= n:
			break
		total += num
		num += 2
		if num >= n:
			break
		total += num
		num += 3
		if num >= n:
			break
		total += num
	return total


if __name__ == "__main__":
		print(F'''{solution() = }''')
