
"""simple docstring"""







from math import floor, sqrt
def        __lowerCAmelCase							(_UpperCamelCase						):
	__lowerCAmelCase     :		str		     = 0.0
	__lowerCAmelCase     :		Dict		     = 1.0
	__lowerCAmelCase     :		Union[str, Any]		     = int(sqrt(_UpperCamelCase						)						)
	__lowerCAmelCase     :		int		     = root
	__lowerCAmelCase     :		List[str]		     = 0
	while integer_part != 2 * root:
		__lowerCAmelCase     :		str		     = denominator * integer_part - numerator
		__lowerCAmelCase     :		Optional[Any]		     = (n - numerator**2) / denominator
		__lowerCAmelCase     :		Dict		     = int((root + numerator) / denominator						)
		period += 1
	return period
def        __lowerCAmelCase							(_UpperCamelCase = 1_0000						):
	__lowerCAmelCase     :		Dict		     = 0
	for i in range(2			,    n + 1						):
		__lowerCAmelCase     :		List[Any]		     = sqrt(_UpperCamelCase						)
		if sr - floor(_UpperCamelCase						) != 0 and continuous_fraction_period(_UpperCamelCase						) % 2 == 1:
			count_odd_periods += 1
	return count_odd_periods


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

"""simple docstring"""







def        __lowerCAmelCase							(_UpperCamelCase			,    _UpperCamelCase						):
	__lowerCAmelCase     :		Any		     = sorted(_UpperCamelCase			,    key=lambda _UpperCamelCase						: edge[2]						)

	__lowerCAmelCase     :		Union[str, Any]		     = list(range(_UpperCamelCase						)						)

	def find_parent(_UpperCamelCase						):
		if i != parent[i]:
			__lowerCAmelCase     :		int		     = find_parent(parent[i]						)
		return parent[i]

	__lowerCAmelCase     :		Optional[Any]		     = 0
	__lowerCAmelCase     :		List[str]		     = []

	for edge in edges:
		__lowerCAmelCase     :		List[str]		     = find_parent(edge[0]						)
		__lowerCAmelCase     :		Optional[Any]		     = find_parent(edge[1]						)
		if parent_a != parent_b:
			minimum_spanning_tree_cost += edge[2]
			minimum_spanning_tree.append(_UpperCamelCase						)
			__lowerCAmelCase     :		Optional[Any]		     = parent_b

	return minimum_spanning_tree


if __name__ == "__main__":  # pragma: no cover
							lowerCamelCase__   ,		lowerCamelCase__     =						list(map(int, input().strip().split()))
							lowerCamelCase__     =						[]

							for _ in range(num_edges):
														lowerCamelCase__   ,		lowerCamelCase__   ,		lowerCamelCase__     =						(int(x) for x in input().strip().split())
														edges.append((nodea, nodea, cost))

							kruskal(num_nodes, edges)