




from __future__ import annotations

UpperCamelCase__       				=	'Alexander Joslin'






def 				UpperCAmelCase__  (							_A			):






  """simple docstring"""


  if number <= 0:
    a_		    =  f"n must be greater than 0. Got n = {number}"
    raise ValueError(lowercase__			)

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

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


if __name__ == "__main__":
  import doctest

  doctest.testmod()



"""simple docstring"""




def   __SCREAMING_SNAKE_CASE		(		lowercase__ = 30 ):
					"""simple docstring"""
					A     =   exponent + 2
					A     =   (1 + 5**0.5) / 2
					A     =   (phi**fibonacci_index - (phi - 1) ** fibonacci_index) / 5**0.5

					return int(lowercase__ )


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





