


from __future__ import annotations

from typing import Generic, TypeVar

__snake_case   							=						TypeVar('''T''')



class 	__lowerCamelCase			(Generic[T]						):







       def __init__(			self: List[str],A_: Any					):






            '''simple docstring'''




            __UpperCamelCase =			data
            __UpperCamelCase =			self
            __UpperCamelCase =			0



class 	__lowerCamelCase			(Generic[T]						):







       def __init__(			self: List[str]					):






            '''simple docstring'''




            __UpperCamelCase =			{}







       def 		snake_case_	(			self: int,A_: Optional[Any]					):






            '''simple docstring'''




            __UpperCamelCase =			DisjointSetTreeNode(_A					)







       def 		snake_case_	(			self: int,A_: str					):






            '''simple docstring'''




            __UpperCamelCase =			self.map[data]
            if elem_ref != elem_ref.parent:
                 __UpperCamelCase =			self.find_set(elem_ref.parent.data					)
            return elem_ref.parent







       def 		snake_case_	(			self: Optional[Any],A_: List[str],A_: Optional[int]					):






            '''simple docstring'''




            if nodea.rank > nodea.rank:
                 __UpperCamelCase =			nodea
            else:
                 __UpperCamelCase =			nodea
                 if nodea.rank == nodea.rank:
                      nodea.rank += 1







       def 		snake_case_	(			self: str,A_: Dict,A_: int					):






            '''simple docstring'''




            self.link(self.find_set(_A					),self.find_set(_A					)					)



class 	__lowerCamelCase			(Generic[T]						):







       def __init__(			self: Optional[Any]					):






            '''simple docstring'''




            __UpperCamelCase =			{}







       def 		snake_case_	(			self: str,A_: List[Any]					):






            '''simple docstring'''




            if node not in self.connections:
                 __UpperCamelCase =			{}







       def 		snake_case_	(			self: List[Any],A_: List[str],A_: Any,A_: Any					):






            '''simple docstring'''




            self.add_node(_A					)
            self.add_node(_A					)
            __UpperCamelCase =			weight
            __UpperCamelCase =			weight







       def 		snake_case_	(			self: Union[str, Any]					):






            '''simple docstring'''




            __UpperCamelCase =			[]
            __UpperCamelCase =			set()
            for start in self.connections:
                 for end in self.connections[start]:
                      if (start, end) not in seen:
                           seen.add((end, start)					)
                           edges.append((start, end, self.connections[start][end])					)
            edges.sort(key=lambda A_					: x[2]					)

            # creating the disjoint set
            __UpperCamelCase =			DisjointSetTree[T]()
            for node in self.connections:
                 disjoint_set.make_set(_A					)

            # MST generation
            __UpperCamelCase =			0
            __UpperCamelCase =			0
            __UpperCamelCase =			GraphUndirectedWeighted[T]()
            while num_edges < len(self.connections					) - 1:
                 __UpperCamelCase =			edges[index]
                 index += 1
                 __UpperCamelCase =			disjoint_set.find_set(_A					)
                 __UpperCamelCase =			disjoint_set.find_set(_A					)
                 if parent_u != parent_v:
                      num_edges += 1
                      graph.add_edge(_A,_A,_A					)
                      disjoint_set.union(_A,_A					)
            return graph









"""simple docstring"""


from math import ceil, sqrt

def      UpperCamelCase							(SCREAMING_SNAKE_CASE = 100_0000     ):
						UpperCamelCase				:		int				   =			0

						for outer_width in range(3							,     (limit // 4) + 2     ):
												if outer_width**2 > limit:
																		UpperCamelCase				:		Optional[Any]				   =			max(ceil(sqrt(outer_width**2 - limit     )     )							,     1     )
												else:
																		UpperCamelCase				:		str				   =			1
												if (outer_width - hole_width_lower_bound) % 2:
																		hole_width_lower_bound += 1

												answer += (outer_width - hole_width_lower_bound - 2) // 2 + 1

						return answer


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



