





'''simple docstring'''




def 			_lowerCAmelCase     (    __snake_case    :					int					,				__snake_case    :					list     )	->	Union[str, Any]:
     _enforce_args(__snake_case					,				__snake_case     )
     if n == 0:
          return 0
     __A		:					Any						=			float('-inf'     )
     for i in range(1					,				n + 1     ):
          __A		:					Optional[int]						=			max(
              __snake_case					,				prices[i - 1] + naive_cut_rod_recursive(n - i					,				__snake_case     )     )

     return max_revue






def 			_lowerCAmelCase     (    __snake_case    :					int					,				__snake_case    :					list     )	->	Optional[int]:
     _enforce_args(__snake_case					,				__snake_case     )
     __A		:					str						=			[float('-inf'     ) for _ in range(n + 1     )]
     return _top_down_cut_rod_recursive(__snake_case					,				__snake_case					,				__snake_case     )






def 			_lowerCAmelCase     (    __snake_case    :					int					,				__snake_case    :					list					,				__snake_case    :					list     )	->	Any:
     if max_rev[n] >= 0:
          return max_rev[n]
     elif n == 0:
          return 0
     else:
          __A		:					str						=			float('-inf'     )
          for i in range(1					,				n + 1     ):
               __A		:					List[str]						=			max(
                   __snake_case					,				prices[i - 1] + _top_down_cut_rod_recursive(n - i					,				__snake_case					,				__snake_case     )					,				)

          __A		:					Optional[int]						=			max_revenue

     return max_rev[n]






def 			_lowerCAmelCase     (    __snake_case    :					int					,				__snake_case    :					list     )	->	Any:
     _enforce_args(__snake_case					,				__snake_case     )

     # length(max_rev) = n + 1, to accommodate for the revenue obtainable from a rod of
     # length 0.
     __A		:					Union[str, Any]						=			[float('-inf'     ) for _ in range(n + 1     )]
     __A		:					Optional[int]						=			0

     for i in range(1					,				n + 1     ):
          __A		:					Optional[Any]						=			max_rev[i]
          for j in range(1					,				i + 1     ):
               __A		:					int						=			max(__snake_case					,				prices[j - 1] + max_rev[i - j]     )

          __A		:					Optional[Any]						=			max_revenue_i

     return max_rev[n]






def 			_lowerCAmelCase     (    __snake_case    :					int					,				__snake_case    :					list     )	->	List[Any]:
     if n < 0:
          __A		:					Optional[Any]						=			f'n must be greater than or equal to 0. Got n = {n}'
          raise ValueError(__snake_case     )

     if n > len(__snake_case     ):
          __A		:					Optional[int]						=			(
              'Each integral piece of rod must have a corresponding price. '
              f'Got n = {n} but length of prices = {len(__snake_case     )}'
          )
          raise ValueError(__snake_case     )






def 			_lowerCAmelCase     (    )	->	Tuple:
     __A		:					Dict						=			[6, 10, 12, 15, 20, 23]
     __A		:					Tuple						=			len(__snake_case     )

     # the best revenue comes from cutting the rod into 6 pieces, each
     # of length 1 resulting in a revenue of 6 * 6 = 36.
     __A		:					int						=			36

     __A		:					str						=			top_down_cut_rod(__snake_case					,				__snake_case     )
     __A		:					Optional[int]						=			bottom_up_cut_rod(__snake_case					,				__snake_case     )
     __A		:					Optional[int]						=			naive_cut_rod_recursive(__snake_case					,				__snake_case     )

     assert expected_max_revenue == max_rev_top_down
     assert max_rev_top_down == max_rev_bottom_up
     assert max_rev_bottom_up == max_rev_naive


if __name__ == "__main__":
  main()

"""simple docstring"""

from math import ceil, sqrt




def      lowercase__    (       lowerCAmelCase					:       int = 1_000_000			)			->   int:






    """simple docstring"""




    UpperCAmelCase          =       0

    for outer_width in range(3			,					(limit // 4) + 2			):
        if outer_width**2 > limit:
            UpperCAmelCase          =       max(ceil(sqrt(outer_width**2 - limit			)			)			,					1			)
        else:
            UpperCAmelCase          =       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() = }')



