
from collections.abc import Callable

class 							_UpperCamelCase					:






			'''simple docstring'''

			def __init__(							self			:							Optional[int]    ,						snake_case_			:							Any = None   ):
							# Stores actual heap items.
							UpperCamelCase_:				list						=    []
							# Stores indexes of each item for supporting updates and deletion.
							UpperCamelCase_:				dict						=    {}
							# Stores current size of heap.
							UpperCamelCase_:				List[str]						=    0
							# Stores function used to evaluate the score of an item on which basis ordering
							# will be done.
							UpperCamelCase_:				Dict						=    key or (lambda snake_case_   : x)

			def    lowerCAmelCase__						(							self			:							Optional[Any]    ,						snake_case_			:							Any   ):
							return int((i - 1) / 2   ) if i > 0 else None

			def    lowerCAmelCase__						(							self			:							Optional[int]    ,						snake_case_			:							str   ):
							UpperCamelCase_:				Union[str, Any]						=    int(2 * i + 1   )
							return left if 0 < left < self.size else None

			def    lowerCAmelCase__						(							self			:							Optional[Any]    ,						snake_case_			:							Dict   ):
							UpperCamelCase_:				Optional[Any]						=    int(2 * i + 2   )
							return right if 0 < right < self.size else None

			def    lowerCAmelCase__						(							self			:							List[Any]    ,						snake_case_			:							Any    ,						snake_case_			:							Tuple   ):
							UpperCamelCase_:				Union[str, Any]						=    (
							    self.pos_map[self.arr[j][0]],
							    self.pos_map[self.arr[i][0]],
							)
							# Then swap the items in the list.
							UpperCamelCase_:				str						=    self.arr[j], self.arr[i]

			def    lowerCAmelCase__						(							self			:							Any    ,						snake_case_			:							Optional[int]    ,						snake_case_			:							Optional[Any]   ):
							return self.arr[i][1] < self.arr[j][1]

			def    lowerCAmelCase__						(							self			:							Tuple    ,						snake_case_			:							str   ):
							UpperCamelCase_:				Dict						=    self._left(snake_case_   )
							UpperCamelCase_:				Any						=    self._right(snake_case_   )
							UpperCamelCase_:				Optional[int]						=    i

							if left is not None and not self._cmp(snake_case_    ,						snake_case_   ):
											UpperCamelCase_:				Optional[Any]						=    left
							if right is not None and not self._cmp(snake_case_    ,						snake_case_   ):
											UpperCamelCase_:				str						=    right

							return valid_parent

			def    lowerCAmelCase__						(							self			:							Any    ,						snake_case_			:							Union[str, Any]   ):
							UpperCamelCase_:				Any						=    self._parent(snake_case_   )
							while parent is not None and not self._cmp(snake_case_    ,						snake_case_   ):
											self._swap(snake_case_    ,						snake_case_   )
											UpperCamelCase_:				Dict						=    parent, self._parent(snake_case_   )

			def    lowerCAmelCase__						(							self			:							List[Any]    ,						snake_case_			:							Any   ):
							UpperCamelCase_:				List[Any]						=    self._get_valid_parent(snake_case_   )
							while valid_parent != index:
											self._swap(snake_case_    ,						snake_case_   )
											UpperCamelCase_:				Union[str, Any]						=    valid_parent, self._get_valid_parent(snake_case_   )

			def    lowerCAmelCase__						(							self			:							Tuple    ,						snake_case_			:							List[str]    ,						snake_case_			:							int   ):
							if item not in self.pos_map:
											return
							UpperCamelCase_:				Optional[int]						=    self.pos_map[item]
							UpperCamelCase_:				Tuple						=    [item, self.key(snake_case_   )]
							# Make sure heap is right in both up and down direction.
							# Ideally only one of them will make any change.
							self._heapify_up(snake_case_   )
							self._heapify_down(snake_case_   )

			def    lowerCAmelCase__						(							self			:							Union[str, Any]    ,						snake_case_			:							Optional[int]   ):
							if item not in self.pos_map:
											return
							UpperCamelCase_:				Union[str, Any]						=    self.pos_map[item]
							del self.pos_map[item]
							UpperCamelCase_:				Union[str, Any]						=    self.arr[self.size - 1]
							UpperCamelCase_:				int						=    index
							self.size -= 1
							# Make sure heap is right in both up and down direction. Ideally only one
							# of them will make any change- so no performance loss in calling both.
							if self.size > index:
											self._heapify_up(snake_case_   )
											self._heapify_down(snake_case_   )

			def    lowerCAmelCase__						(							self			:							List[Any]    ,						snake_case_			:							Tuple    ,						snake_case_			:							str   ):
							UpperCamelCase_:				Any						=    len(self.arr   )
							if arr_len == self.size:
											self.arr.append([item, self.key(snake_case_   )]   )
							else:
											UpperCamelCase_:				int						=    [item, self.key(snake_case_   )]
							UpperCamelCase_:				Optional[Any]						=    self.size
							self.size += 1
							self._heapify_up(self.size - 1   )

			def    lowerCAmelCase__						(							self			:							List[str]   ):
							return self.arr[0] if self.size else None




			def    lowerCAmelCase__						(							self			:							int   ):
							UpperCamelCase_:				Dict						=    self.get_top()
							if top_item_tuple:
											self.delete_item(top_item_tuple[0]   )
							return top_item_tuple







def 							A__       (    )	->						Dict:
				pass





if __name__ == "__main__":
							import doctest

							doctest.testmod()











"""simple docstring"""







from math import ceil, sqrt

def     UpperCAmelCase_					(				__a   :			int = 1_00_00_00						):




			'''simple docstring'''



			_lowerCamelCase					:					Tuple	       =    0

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





