"""simple docstring"""






import math
from decimal import Decimal, getcontext



def SCREAMING_SNAKE_CASE__    (     __UpperCAmelCase = 4_0_0_0_0_0_0				)						->						int:

   try:
      lowercase__:     str      =   int(__UpperCAmelCase				)
   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.'''				)
   lowercase__:     List[str]      =   1_0_0
   lowercase__:     int      =   (Decimal(5				) ** Decimal(0.5				) + 1) / Decimal(2				)

   lowercase__:     Any      =   (math.floor(math.log(n * (phi + 2) ,					__UpperCAmelCase				) - 1				) // 3) * 3 + 2
   lowercase__:     str      =   Decimal(round(phi ** Decimal(index + 1				)				)				) / (phi + 2)
   lowercase__:     Any      =   num // 2
   return int(__UpperCAmelCase				)


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

"""simple docstring"""






def SCREAMING_SNAKE_CASE__    (     __UpperCAmelCase				)						->						int:
   if not isinstance(__UpperCAmelCase ,					__UpperCAmelCase				):
      lowercase__:     Optional[int]      =   F"""Input value of [number={number}] must be an integer"""
      raise TypeError(__UpperCAmelCase				)
   if number < 1:
      raise ValueError('''Input must be a positive integer'''				)
   return number * (2 * number - 1)


if __name__ == "__main__":
       import doctest

       doctest.testmod()
