



from __future__ import annotations

class       _SCREAMING_SNAKE_CASE	:





     def __init__(       self :							int     ,  UpperCamelCase :							int				)->None:
      __SCREAMING_SNAKE_CASE       :    Any       =	order

      # a_{0} ... a_{k}
      __SCREAMING_SNAKE_CASE       :    Tuple       =	[1.0] + [0.0] * order
      # b_{0} ... b_{k}
      __SCREAMING_SNAKE_CASE       :    Union[str, Any]       =	[1.0] + [0.0] * order

      # x[n-1] ... x[n-k]
      __SCREAMING_SNAKE_CASE       :    List[str]       =	[0.0] * self.order
      # y[n-1] ... y[n-k]
      __SCREAMING_SNAKE_CASE       :    str       =	[0.0] * self.order





     def 	__snake_case    (       self :							Optional[int]     ,  UpperCamelCase :							list[float]     ,  UpperCamelCase :							list[float]				)->None:
      if len(UpperCamelCase				) < self.order:
       __SCREAMING_SNAKE_CASE       :    Optional[int]       =	[1.0, *a_coeffs]

      if len(UpperCamelCase				) != self.order + 1:
       __SCREAMING_SNAKE_CASE       :    Tuple       =	(
           F"""Expected a_coeffs to have {self.order + 1} elements """
           F"""for {self.order}-order filter, got {len(UpperCamelCase				)}"""
       )
       raise ValueError(UpperCamelCase				)

      if len(UpperCamelCase				) != self.order + 1:
       __SCREAMING_SNAKE_CASE       :    Dict       =	(
           F"""Expected b_coeffs to have {self.order + 1} elements """
           F"""for {self.order}-order filter, got {len(UpperCamelCase				)}"""
       )
       raise ValueError(UpperCamelCase				)

      __SCREAMING_SNAKE_CASE       :    Optional[Any]       =	a_coeffs
      __SCREAMING_SNAKE_CASE       :    Tuple       =	b_coeffs






     def 	__snake_case    (       self :							Optional[int]     ,  UpperCamelCase :							float				)->float:
      __SCREAMING_SNAKE_CASE       :    int       =	0.0

      # Start at index 1 and do index 0 at the end.
      for i in range(1     ,  self.order + 1				):
       result += (
           self.b_coeffs[i] * self.input_history[i - 1]
           - self.a_coeffs[i] * self.output_history[i - 1]
       )

      __SCREAMING_SNAKE_CASE       :    Union[str, Any]       =	(result + self.b_coeffs[0] * sample) / self.a_coeffs[0]

      __SCREAMING_SNAKE_CASE       :    int       =	self.input_history[:-1]
      __SCREAMING_SNAKE_CASE       :    Dict       =	self.output_history[:-1]

      __SCREAMING_SNAKE_CASE       :    str       =	sample
      __SCREAMING_SNAKE_CASE       :    Dict       =	result

      return result











from math import sqrt






def 	_lowerCAmelCase						(				__lowerCamelCase   :     int = 1000000     ):



 """simple docstring"""





 __SCREAMING_SNAKE_CASE       :    int       =	0
 __SCREAMING_SNAKE_CASE       :    int       =	0
 __SCREAMING_SNAKE_CASE       :    int

 while num_cuboids <= limit:
  max_cuboid_size += 1
  for sum_shortest_sides in range(2		,	2 * max_cuboid_size + 1     ):
   if sqrt(sum_shortest_sides**2 + max_cuboid_size**2     ).is_integer():
    num_cuboids += (
        min(__lowerCamelCase		,	sum_shortest_sides // 2     )
        - max(1		,	sum_shortest_sides - max_cuboid_size     )
        + 1
    )

 return max_cuboid_size


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






