




import math
from decimal import Decimal, getcontext
def 				__UpperCamelCase  (		snake_case = 4_0_0_0_0_0_0     )  ->						int:


   '''simple docstring'''







   try:
      __A				 =       int(snake_case     )
   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.'''     )
   __A				 =       1_0_0
   __A				 =       (Decimal(5     ) ** Decimal(0.5     ) + 1) / Decimal(2     )

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


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








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


_UpperCamelCase   :							Dict     =	logging.get_logger(__name__)

_UpperCamelCase   :							Optional[int]     =	{
    """MCG-NJU/videomae-base""": """https://huggingface.co/MCG-NJU/videomae-base/resolve/main/config.json""",
}







class 						_lowerCAmelCase(						_a):

  """simple docstring"""







  lowerCamelCase__      					=   '''videomae'''

  def __init__( self  ,    UpperCAmelCase=2_24  ,    UpperCAmelCase=16  ,    UpperCAmelCase=3  ,    UpperCAmelCase=16  ,    UpperCAmelCase=2  ,    UpperCAmelCase=7_68  ,    UpperCAmelCase=12  ,    UpperCAmelCase=12  ,    UpperCAmelCase=30_72  ,    UpperCAmelCase="gelu"  ,    UpperCAmelCase=0.0  ,    UpperCAmelCase=0.0  ,    UpperCAmelCase=0.02  ,    UpperCAmelCase=1e-12  ,    UpperCAmelCase=True  ,    UpperCAmelCase=True  ,    UpperCAmelCase=6  ,    UpperCAmelCase=3_84  ,    UpperCAmelCase=4  ,    UpperCAmelCase=15_36  ,    UpperCAmelCase=True  ,    **UpperCAmelCase  ,    )-> Any:
     super().__init__(**UpperCAmelCase     )

     __A				 =       image_size
     __A				 =       patch_size
     __A				 =       num_channels
     __A				 =       num_frames
     __A				 =       tubelet_size

     __A				 =       hidden_size
     __A				 =       num_hidden_layers
     __A				 =       num_attention_heads
     __A				 =       intermediate_size
     __A				 =       hidden_act
     __A				 =       hidden_dropout_prob
     __A				 =       attention_probs_dropout_prob
     __A				 =       initializer_range
     __A				 =       layer_norm_eps
     __A				 =       qkv_bias
     __A				 =       use_mean_pooling

     __A				 =       decoder_num_attention_heads
     __A				 =       decoder_hidden_size
     __A				 =       decoder_num_hidden_layers
     __A				 =       decoder_intermediate_size
     __A				 =       norm_pix_loss

