






import math
from decimal import Decimal, getcontext


def __A   (				__lowerCAmelCase = 4_000_000     )->  int:





						"""simple docstring"""



						try:
												_UpperCAmelCase     =      int(__lowerCAmelCase     )
						except (TypeError, ValueError):
												raise TypeError('Parameter n must be int or castable to int.'     )
						if n <= 0:
												raise ValueError('Parameter n must be greater than or equal to one.'     )
						_UpperCAmelCase     =      100
						_UpperCAmelCase     =      (Decimal(5     ) ** Decimal(0.5     ) + 1) / Decimal(2     )

						_UpperCAmelCase     =      (math.floor(math.log(n * (phi + 2)			,		__lowerCAmelCase     ) - 1     ) // 3) * 3 + 2
						_UpperCAmelCase     =      Decimal(round(phi ** Decimal(index + 1     )     )     ) / (phi + 2)
						_UpperCAmelCase     =      num // 2
						return int(__lowerCAmelCase     )


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








from ...configuration_utils import PretrainedConfig
from ...utils import logging


_a				     =  logging.get_logger(__name__)

_a				     =  {
    '''facebook/regnet-y-040''': '''https://huggingface.co/facebook/regnet-y-040/blob/main/config.json''',
}





class __lowerCamelCase			(				snake_case__):





	"""simple docstring"""






	UpperCamelCase__								=				"regnet"
	UpperCamelCase__								=				["x", "y"]

	def __init__(							self	,   UpperCAmelCase=3	,   UpperCAmelCase=32	,   UpperCAmelCase=[128, 192, 512, 1088]	,   UpperCAmelCase=[2, 6, 12, 2]	,   UpperCAmelCase=64	,   UpperCAmelCase="y"	,   UpperCAmelCase="relu"	,   **UpperCAmelCase	,   ):
							"""simple docstring"""







							super().__init__(**UpperCAmelCase   )
							if layer_type not in self.layer_types:
													raise ValueError(F"""layer_type={layer_type} is not one of {",".join(self.layer_types   )}"""   )
							_UpperCAmelCase     =      num_channels
							_UpperCAmelCase     =      embedding_size
							_UpperCAmelCase     =      hidden_sizes
							_UpperCAmelCase     =      depths
							_UpperCAmelCase     =      groups_width
							_UpperCAmelCase     =      layer_type
							_UpperCAmelCase     =      hidden_act
							# always downsample in the first stage
							_UpperCAmelCase     =      True
