



"""simple docstring"""
from __future__ import annotations


class    SCREAMING_SNAKE_CASE__ :

    def __init__(				self			:				Tuple ,  lowerCAmelCase_			:				int):







      """simple docstring"""







      lowercase_								= order

      # a_{0} ... a_{k}
      lowercase_								= [1.0] + [0.0] * order
      # b_{0} ... b_{k}
      lowercase_								= [1.0] + [0.0] * order

      # x[n-1] ... x[n-k]
      lowercase_								= [0.0] * self.order
      # y[n-1] ... y[n-k]
      lowercase_								= [0.0] * self.order

    def 					_UpperCAmelCase	(				self			:				int ,  lowerCAmelCase_			:				list[float] ,  lowerCAmelCase_			:				list[float]):







      """simple docstring"""







      if len(lowerCAmelCase_) < self.order:
        lowercase_								= [1.0, *a_coeffs]

      if len(lowerCAmelCase_) != self.order + 1:
        lowercase_								= (
            F'''Expected a_coeffs to have {self.order + 1} elements '''
            F'''for {self.order}-order filter, got {len(lowerCAmelCase_)}'''
        )
        raise ValueError(lowerCAmelCase_)

      if len(lowerCAmelCase_) != self.order + 1:
        lowercase_								= (
            F'''Expected b_coeffs to have {self.order + 1} elements '''
            F'''for {self.order}-order filter, got {len(lowerCAmelCase_)}'''
        )
        raise ValueError(lowerCAmelCase_)

      lowercase_								= a_coeffs
      lowercase_								= b_coeffs




    def 					_UpperCAmelCase	(				self			:				Tuple ,  lowerCAmelCase_			:				float):







      """simple docstring"""







      lowercase_								= 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]
        )

      lowercase_								= (result + self.b_coeffs[0] * sample) / self.a_coeffs[0]

      lowercase_								= self.input_history[:-1]
      lowercase_								= self.output_history[:-1]

      lowercase_								= sample
      lowercase_								= result

      return result






"""simple docstring"""
def 			_SCREAMING_SNAKE_CASE						(__lowerCAmelCase=2_81_23							) ->						Optional[Any]:







  '''simple docstring'''


  lowercase_								= [1] * (limit + 1)

  for i in range(2 ,  int(limit**0.5							) + 1							):
    sum_divs[i * i] += i
    for k in range(i + 1 ,  limit // i + 1							):
      sum_divs[k * i] += k + i

  lowercase_								= set()
  lowercase_								= 0

  for n in range(1 ,  limit + 1							):
    if sum_divs[n] > n:
      abundants.add(__lowerCAmelCase							)

    if not any((n - a in abundants) for a in abundants							):
      res += n

  return res


if __name__ == "__main__":
       print(solution())

