
"""simple docstring"""






class 			_SCREAMING_SNAKE_CASE					:  # Public class to implement a graph






			def __init__(					self       ,   __A       ,   __A       ,   __A       )			->     None:
						lowerCAmelCase_    :List[str]			     =  row
						lowerCAmelCase_    :Tuple			     =  col
						lowerCAmelCase_    :str			     =  graph






			def  __lowerCAmelCase (					self       ,   __A       ,   __A       ,   __A       )			->     bool:
						return (
						    0 <= i < self.ROW
						    and 0 <= j < self.COL
						    and not visited[i][j]
						    and self.graph[i][j]
						)






			def  __lowerCAmelCase (					self       ,   __A       ,   __A       ,   __A       )			->     None:
						# Checking all 8 elements surrounding nth element
						lowerCAmelCase_    :int			     =  [-1, -1, -1, 0, 0, 1, 1, 1]  # Coordinate order
						lowerCAmelCase_    :Tuple			     =  [-1, 0, 1, -1, 1, -1, 0, 1]
						lowerCAmelCase_    :int			     =  True  # Make those cells visited
						for k in range(8       ):
									if self.is_safe(i + row_nbr[k]       ,   j + col_nbr[k]       ,   __A       ):
												self.diffs(i + row_nbr[k]       ,   j + col_nbr[k]       ,   __A       )






			def  __lowerCAmelCase (					self       )			->     int:  # And finally, count all islands.
						lowerCAmelCase_    :int			     =  [[False for j in range(self.COL       )] for i in range(self.ROW       )]
						lowerCAmelCase_    :Optional[int]			     =  0
						for i in range(self.ROW       ):
									for j in range(self.COL       ):
												if visited[i][j] is False and self.graph[i][j] == 1:
															self.diffs(__A       ,   __A       ,   __A       )
															count += 1
						return count











from math import ceil, sqrt



def 			_lowerCAmelCase       (					__lowerCAmelCase = 1000000      )   ->					int:


				"""simple docstring"""

				snake_case__	:      Dict     		=	0

				for outer_width in range(3  ,  (limit // 4) + 2      ):
								if outer_width**2 > limit:
												snake_case__	:      Any     		=	max(ceil(sqrt(outer_width**2 - limit      )      )  ,  1      )
								else:
												snake_case__	:      int     		=	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() = }""")

