
"""simple docstring"""

from __future__ import annotations

from collections.abc import Iterator
class   _UpperCAmelCase				:




      def __init__(				self ,							lowercase_				)    ->       None:
          UpperCAmelCase          =       value
          UpperCAmelCase          =       None
          UpperCAmelCase          =       None

class   _UpperCAmelCase				:




      def __init__(				self ,							lowercase_				)    ->       None:
          UpperCAmelCase          =       tree




      def      a_   (				self ,							lowercase_				)    ->       int:
          if node is None:
              return 0
          return node.value + (
              self.depth_first_search(node.left				) + self.depth_first_search(node.right				)
          )




      def __iter__(				self				)    ->       Iterator[int]:
          yield self.depth_first_search(self.tree				)


if __name__ == "__main__":
   import doctest

   doctest.testmod()





"""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() = }')



