






from math import floor, sqrt






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






def 				A	(			a_ = 10_000   )	->		int:
					__UpperCamelCase :   Optional[Any]									=0
					for i in range(2				,n + 1   ):
										__UpperCamelCase :   str									=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()))}")









from sklearn.datasets import load_iris
from sklearn.model_selection import train_test_split
from sklearn.neighbors import KNeighborsClassifier

# Load iris file
A_			:Union[str, Any]	    =		load_iris()
iris.keys()


print(f"Target names: \n {iris.target_names} ")
print(f"\n Features: \n {iris.feature_names}")

# Train set e Test set
A_    ,A_    ,A_    ,A_			:Tuple	    =		train_test_split(
    iris['''data'''], iris['''target'''], random_state=4
)

# KNN

A_			:Any	    =		KNeighborsClassifier(n_neighbors=1)
knn.fit(X_train, y_train)

# new array to test
A_			:Optional[Any]	    =		[[1, 2, 1, 4], [2, 3, 4, 5]]

A_			:Union[str, Any]	    =		knn.predict(X_new)

print(
    f"\nNew array: \n {X_new}\n\nTarget Names Prediction: \n"
    f" {iris['target_names'][prediction]}"
)

