




from ...configuration_utils import PretrainedConfig
from ...utils import logging
from ...utils.backbone_utils import BackboneConfigMixin, get_aligned_output_features_output_indices


UpperCamelCase__					    =    logging.get_logger(__name__)

UpperCamelCase__					    =    {
    """facebook/convnextv2-tiny-1k-224""": """https://huggingface.co/facebook/convnextv2-tiny-1k-224/resolve/main/config.json""",
}
class     a__					(      snake_case__				,       snake_case__   ):
						_a							:					List[str]      =					"""convnextv2"""






						def __init__(     self	,    _A=3	,    _A=4	,    _A=4	,    _A=None	,    _A=None	,    _A="gelu"	,    _A=0.02	,    _A=1E-1_2	,    _A=0.0	,    _A=2_2_4	,    _A=None	,    _A=None	,    **_A	,    ):




											"""simple docstring"""



											super().__init__(**_A    )

											__lowerCAmelCase            = num_channels
											__lowerCAmelCase            = patch_size
											__lowerCAmelCase            = num_stages
											__lowerCAmelCase            = [9_6, 1_9_2, 3_8_4, 7_6_8] if hidden_sizes is None else hidden_sizes
											__lowerCAmelCase            = [3, 3, 9, 3] if depths is None else depths
											__lowerCAmelCase            = hidden_act
											__lowerCAmelCase            = initializer_range
											__lowerCAmelCase            = layer_norm_eps
											__lowerCAmelCase            = drop_path_rate
											__lowerCAmelCase            = image_size
											__lowerCAmelCase            = ["stem"] + [f"""stage{idx}""" for idx in range(1	,    len(self.depths    ) + 1    )]
											__lowerCAmelCase     ,							__lowerCAmelCase            = get_aligned_output_features_output_indices(
											    out_features=_A	,    out_indices=_A	,    stage_names=self.stage_names    )










from math import ceil, sqrt







def 			_a   (		SCREAMING_SNAKE_CASE_							:       int = 1_00_00_00  ):
					__lowerCAmelCase            = 0

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




