

from __future__ import annotations

_lowerCamelCase								='''Alexander Joslin'''







def       snake_case__    (       lowerCAmelCase_      ):





     """simple docstring"""







     if number <= 0:
          SCREAMING_SNAKE_CASE										=       F'n must be greater than 0. Got n = {number}'
          raise ValueError(A_      )

     SCREAMING_SNAKE_CASE										=       [number + 1] * (number + 1)

     # starting position
     SCREAMING_SNAKE_CASE										=       0
     for i in range(1,   A_      ):
          SCREAMING_SNAKE_CASE										=       min(table[i + 1],   table[i] + 1      )
          # check if out of bounds
          if i * 2 <= number:
               SCREAMING_SNAKE_CASE										=       min(table[i * 2],   table[i] + 1      )
          # check if out of bounds
          if i * 3 <= number:
               SCREAMING_SNAKE_CASE										=       min(table[i * 3],   table[i] + 1      )
     return table[number]


if __name__ == "__main__":
 import doctest

 doctest.testmod()




def       snake_case__    (       lowerCAmelCase_,   lowerCAmelCase_,   lowerCAmelCase_      ):





     """simple docstring"""







     if power < 0:
          return -1
     base %= mod
     SCREAMING_SNAKE_CASE										=1

     while power > 0:
          if power & 1:
               SCREAMING_SNAKE_CASE										=(result * base) % mod
          SCREAMING_SNAKE_CASE										=power >> 1
          SCREAMING_SNAKE_CASE										=(base * base) % mod

     return result







def       snake_case__    (       ):





     """simple docstring"""







     print(modular_exponential(3,   200,   13      )      )


if __name__ == "__main__":
 import doctest

 doctest.testmod()

 main()

