


'''simple docstring'''
from __future__ import annotations

from collections.abc import Iterator
from typing import Any

class 						_lowerCamelCase					:




 '''simple docstring'''


 def __init__(      self      ,      __lowercase						):

  """simple docstring"""







  __A  :		Any       =			data
  __A  :		Node | None       =			None


class 						_lowerCamelCase					:




 '''simple docstring'''


 def __init__(      self						):

  """simple docstring"""







  __A  :		Optional[Any]       =			None
  __A  :		Optional[Any]       =			None


 def __iter__(      self						):

  """simple docstring"""







  __A  :		List[Any]       =			self.head
  while self.head:
   yield node.data
   __A  :		List[str]       =			node.next
   if node == self.head:
    break


 def __len__(      self						):

  """simple docstring"""







  return sum(1 for _ in self						)


 def __repr__(      self						):

  """simple docstring"""







  return "->".join(str(__lowercase						) for item in iter(self						)						)


 def  snake_case__   (      self      ,      __lowercase						):

  """simple docstring"""







  self.insert_nth(len(self						)      ,      __lowercase						)


 def  snake_case__   (      self      ,      __lowercase						):

  """simple docstring"""







  self.insert_nth(0      ,      __lowercase						)


 def  snake_case__   (      self      ,      __lowercase      ,      __lowercase						):

  """simple docstring"""







  if index < 0 or index > len(self						):
   raise IndexError('list index out of range.'						)
  __A  :		Optional[int]       =			Node(__lowercase						)
  if self.head is None:
   __A  :		str       =			new_node  # first node points itself
   __A  :		Tuple       =			new_node
  elif index == 0:  # insert at head
   __A  :		Any       =			self.head
   __A  :		Optional[int]       =			new_node
  else:
   __A  :		Union[str, Any]       =			self.head
   for _ in range(index - 1						):
    __A  :		List[str]       =			temp.next
   __A  :		List[Any]       =			temp.next
   __A  :		Union[str, Any]       =			new_node
   if index == len(self						) - 1:  # insert at tail
    __A  :		int       =			new_node


 def  snake_case__   (      self						):

  """simple docstring"""







  return self.delete_nth(0						)


 def  snake_case__   (      self						):

  """simple docstring"""







  return self.delete_nth(len(self						) - 1						)


 def  snake_case__   (      self      ,      __lowercase = 0						):

  """simple docstring"""







  if not 0 <= index < len(self						):
   raise IndexError('list index out of range.'						)
  __A  :		List[Any]       =			self.head
  if self.head == self.tail:  # just one node
   __A  :		Any       =			None
  elif index == 0:  # delete head node
   __A  :		Optional[Any]       =			self.tail.next.next
   __A  :		Union[str, Any]       =			self.head.next
  else:
   __A  :		Tuple       =			self.head
   for _ in range(index - 1						):
    __A  :		Optional[int]       =			temp.next
   __A  :		Tuple       =			temp.next
   __A  :		Optional[int]       =			temp.next.next
   if index == len(self						) - 1:  # delete at tail
    __A  :		List[Any]       =			temp
  return delete_node.data







 def  snake_case__   (      self						):

  """simple docstring"""







  return len(self						) == 0


def 			_lowercase       (				):
 __A  :		str       =			CircularLinkedList()
 assert len(UpperCamelCase__			) == 0
 assert circular_linked_list.is_empty() is True
 assert str(UpperCamelCase__			) == ""

 try:
  circular_linked_list.delete_front()
  raise AssertionError  # This should not happen
 except IndexError:
  assert True  # This should happen

 try:
  circular_linked_list.delete_tail()
  raise AssertionError  # This should not happen
 except IndexError:
  assert True  # This should happen

 try:
  circular_linked_list.delete_nth(-1			)
  raise AssertionError
 except IndexError:
  assert True

 try:
  circular_linked_list.delete_nth(0			)
  raise AssertionError
 except IndexError:
  assert True

 assert circular_linked_list.is_empty() is True
 for i in range(5			):
  assert len(UpperCamelCase__			) == i
  circular_linked_list.insert_nth(UpperCamelCase__,				i + 1			)
 assert str(UpperCamelCase__			) == "->".join(str(UpperCamelCase__			) for i in range(1,				6			)			)

 circular_linked_list.insert_tail(6			)
 assert str(UpperCamelCase__			) == "->".join(str(UpperCamelCase__			) for i in range(1,				7			)			)
 circular_linked_list.insert_head(0			)
 assert str(UpperCamelCase__			) == "->".join(str(UpperCamelCase__			) for i in range(0,				7			)			)

 assert circular_linked_list.delete_front() == 0
 assert circular_linked_list.delete_tail() == 6
 assert str(UpperCamelCase__			) == "->".join(str(UpperCamelCase__			) for i in range(1,				6			)			)
 assert circular_linked_list.delete_nth(2			) == 3

 circular_linked_list.insert_nth(2,				3			)
 assert str(UpperCamelCase__			) == "->".join(str(UpperCamelCase__			) for i in range(1,				6			)			)

 assert circular_linked_list.is_empty() is False


if __name__ == "__main__":
 import doctest

 doctest.testmod()










'''simple docstring'''
from collections import defaultdict
from math import ceil, sqrt


def 			_lowercase       (				UpperCamelCase__       :					int = 1000000,				UpperCamelCase__       :					int = 10			):
 __A  :		defaultdict       =			defaultdict(UpperCamelCase__			)

 for outer_width in range(3,				(t_limit // 4) + 2			):
  if outer_width * outer_width > t_limit:
   __A  :		Optional[int]       =			max(
       ceil(sqrt(outer_width * outer_width - t_limit			)			),				1			)
  else:
   __A  :		Optional[Any]       =			1

  hole_width_lower_bound += (outer_width - hole_width_lower_bound) % 2

  for hole_width in range(UpperCamelCase__,				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 <= 10			)


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






