

"""simple docstring"""





from math import floor, sqrt

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

def 						__SCREAMING_SNAKE_CASE						(   A_ = 1_00_00				):
	lowerCAmelCase__			:		Any						       =			0
	for i in range(2		,  n + 1				):
		lowerCAmelCase__			:		Dict						       =			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()))}''')







"""simple docstring"""





from cva import COLOR_BGR2GRAY, cvtColor, imread, imshow, waitKey
from numpy import divide, inta, multiply, ravel, sort, zeros_like

def 						__SCREAMING_SNAKE_CASE						(   A_		,  A_=3				):
	lowerCAmelCase__			:		Union[str, Any]						       =			int(mask / 2				)
	# copy image size
	lowerCAmelCase__			:		Dict						       =			zeros_like(A_				)
	for i in range(A_		,  gray_img.shape[0] - bd				):
		for j in range(A_		,  gray_img.shape[1] - bd				):
			# get mask according with mask
			lowerCAmelCase__			:		str						       =			ravel(gray_img[i - bd : i + bd + 1, j - bd : j + bd + 1]				)
			# calculate mask median
			lowerCAmelCase__			:		str						       =			sort(A_				)[inta(divide((multiply(A_		,  A_				))		,  2				) + 1				)]
			lowerCAmelCase__			:		List[str]						       =			median
	return median_img


if __name__ == "__main__":
							# read original image
							__UpperCamelCase						:   Dict							   =	imread('''../image_data/lena.jpg''')
							# turn image in gray scale value
							__UpperCamelCase						:   Optional[Any]							   =	cvtColor(img, COLOR_BGR2GRAY)

							# get values with two different mask size
							__UpperCamelCase						:   int							   =	median_filter(gray, 3)
							__UpperCamelCase						:   Tuple							   =	median_filter(gray, 5)

							# show result images
							imshow('''median filter with 3x3 mask''', medianaxa)
							imshow('''median filter with 5x5 mask''', medianaxa)
							waitKey(0)




