




from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


_UpperCAmelCase				:	Optional[Any]    						=    {'configuration_visual_bert': ['VISUAL_BERT_PRETRAINED_CONFIG_ARCHIVE_MAP', 'VisualBertConfig']}

try:
   if not is_torch_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   _UpperCAmelCase				:	List[Any]    						=    [
       'VISUAL_BERT_PRETRAINED_MODEL_ARCHIVE_LIST',
       'VisualBertForMultipleChoice',
       'VisualBertForPreTraining',
       'VisualBertForQuestionAnswering',
       'VisualBertForRegionToPhraseAlignment',
       'VisualBertForVisualReasoning',
       'VisualBertLayer',
       'VisualBertModel',
       'VisualBertPreTrainedModel',
   ]


if TYPE_CHECKING:
   from .configuration_visual_bert import VISUAL_BERT_PRETRAINED_CONFIG_ARCHIVE_MAP, VisualBertConfig

   try:
      if not is_torch_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .modeling_visual_bert import (
          VISUAL_BERT_PRETRAINED_MODEL_ARCHIVE_LIST,
          VisualBertForMultipleChoice,
          VisualBertForPreTraining,
          VisualBertForQuestionAnswering,
          VisualBertForRegionToPhraseAlignment,
          VisualBertForVisualReasoning,
          VisualBertLayer,
          VisualBertModel,
          VisualBertPreTrainedModel,
      )


else:
   import sys

   _UpperCAmelCase				:	Optional[int]    						=    _LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)







import math
from decimal import Decimal, getcontext






def    UpperCAmelCase__	(						lowerCamelCase  : int = 4_00_00_00						):

   try:
      lowerCamelCase											=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."""						)
   lowerCamelCase											=1_00
   lowerCamelCase											=(Decimal(5						) ** Decimal(0.5						) + 1) / Decimal(2						)

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


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