

from collections.abc import Iterator, MutableMapping
from dataclasses import dataclass
from typing import Generic, TypeVar

snake_case_							=			TypeVar('''KEY''')
snake_case_							=			TypeVar('''VAL''')
@dataclass(frozen=UpperCamelCase_						,					slots=UpperCamelCase_)
class        snake_case_		(			Generic[KEY, VAL]):
		lowerCamelCase    :KEY
		lowerCamelCase    :VAL

class        snake_case_		(			_Item):







		def __init__(		self   )				->   None:
				super().__init__(_a			,     _a   )







		def __bool__(		self   )				->   bool:
				return False

snake_case_							=			_DeletedItem()
class        snake_case_		(			MutableMapping[KEY, VAL]):







		def __init__(		self			,     __lowercase = 8			,     __lowercase = 0.7_5   )				->   None:
				lowerCamelCase   : List[Any]								=initial_block_size
				lowerCamelCase   : list[_Item | None]								=[None] * initial_block_size
				assert 0.0 < capacity_factor < 1.0
				lowerCamelCase   : Optional[int]								=capacity_factor
				lowerCamelCase   : Any								=0







		def 			__lowercase   (		self			,     __lowercase   )				->   int:
				return hash(_a   ) % len(self._buckets   )







		def 			__lowercase   (		self			,     __lowercase   )				->   int:
				return (ind + 1) % len(self._buckets   )







		def 			__lowercase   (		self			,     __lowercase			,     __lowercase			,     __lowercase   )				->   bool:
				lowerCamelCase   : List[Any]								=self._buckets[ind]
				if not stored:
						lowerCamelCase   : str								=_Item(_a			,     _a   )
						self._len += 1
						return True
				elif stored.key == key:
						lowerCamelCase   : Union[str, Any]								=_Item(_a			,     _a   )
						return True
				else:
						return False







		def 			__lowercase   (		self   )				->   bool:
				lowerCamelCase   : List[str]								=len(self._buckets   ) * self._capacity_factor
				return len(self   ) >= int(_a   )







		def 			__lowercase   (		self   )				->   bool:


				if len(self._buckets   ) <= self._initial_block_size:
						return False
				lowerCamelCase   : List[Any]								=len(self._buckets   ) * self._capacity_factor / 2
				return len(self   ) < limit







		def 			__lowercase   (		self			,     __lowercase   )				->   None:
				lowerCamelCase   : Dict								=self._buckets
				lowerCamelCase   : Tuple								=[None] * new_size
				lowerCamelCase   : Any								=0
				for item in old_buckets:
						if item:
								self._add_item(item.key			,     item.val   )







		def 			__lowercase   (		self   )				->   None:
				self._resize(len(self._buckets   ) * 2   )







		def 			__lowercase   (		self   )				->   None:
				self._resize(len(self._buckets   ) // 2   )







		def 			__lowercase   (		self			,     __lowercase   )				->   Iterator[int]:
				lowerCamelCase   : str								=self._get_bucket_index(_a   )
				for _ in range(len(self._buckets   )   ):
						yield ind
						lowerCamelCase   : List[str]								=self._get_next_ind(_a   )







		def 			__lowercase   (		self			,     __lowercase			,     __lowercase   )				->   None:


				for ind in self._iterate_buckets(_a   ):
						if self._try_set(_a			,     _a			,     _a   ):
								break







		def __setitem__(		self			,     __lowercase			,     __lowercase   )				->   None:


				if self._is_full():
						self._size_up()

				self._add_item(_a			,     _a   )







		def __delitem__(		self			,     __lowercase   )				->   None:


				for ind in self._iterate_buckets(_a   ):
						lowerCamelCase   : Dict								=self._buckets[ind]
						if item is None:
								raise KeyError(_a   )
						if item is _deleted:
								continue
						if item.key == key:
								lowerCamelCase   : List[Any]								=_deleted
								self._len -= 1
								break
				if self._is_sparse():
						self._size_down()







		def __getitem__(		self			,     __lowercase   )				->   VAL:


				for ind in self._iterate_buckets(_a   ):
						lowerCamelCase   : Optional[Any]								=self._buckets[ind]
						if item is None:
								break
						if item is _deleted:
								continue
						if item.key == key:
								return item.val
				raise KeyError(_a   )







		def __len__(		self   )				->   int:
				return self._len







		def __iter__(		self   )				->   Iterator[KEY]:
				yield from (item.key for item in self._buckets if item)







		def __repr__(		self   )				->   str:
				lowerCamelCase   : int								=""" ,""".join(
				    F"{item.key}: {item.val}" for item in self._buckets if item   )
				return F"HashMap({val_string})"








from collections import defaultdict
from math import ceil, sqrt


def 					A__	(       SCREAMING_SNAKE_CASE_ = 1_0_0_0_0_0_0							,       SCREAMING_SNAKE_CASE_ = 1_0		)   ->     int:
		lowerCamelCase   : defaultdict								=defaultdict(SCREAMING_SNAKE_CASE_		)

		for outer_width in range(3							,       (t_limit // 4) + 2		):
				if outer_width * outer_width > t_limit:
						lowerCamelCase   : Any								=max(
						    ceil(sqrt(outer_width * outer_width - t_limit		)		)							,       1		)
				else:
						lowerCamelCase   : str								=1

				hole_width_lower_bound += (outer_width - hole_width_lower_bound) % 2

				for hole_width in range(SCREAMING_SNAKE_CASE_							,       outer_width - 1							,       2		):
						count[outer_width * outer_width - hole_width * hole_width] += 1

		return sum(1 for n in count.values() if 1 <= n <= 1_0		)


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

