'''simple docstring'''




from __future__ import annotations

__lowercase				   =  '''Alexander Joslin'''






def     snake_case__							(      _A: int			)   ->     int:

		'''simple docstring'''


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

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

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


if __name__ == "__main__":
						import doctest

						doctest.testmod()





'''simple docstring'''




from ..utils import DummyObject, requires_backends






class     a__( metaclass=lowerCAmelCase__     ):


			'''simple docstring'''






			UpperCAmelCase_      :					Optional[int]								=	['''torch''', '''transformers''', '''k_diffusion''']



			def __init__(       self	,   *__lowerCAmelCase	,   **__lowerCAmelCase):




					"""simple docstring"""


					requires_backends(self	,   ["""torch""", """transformers""", """k_diffusion"""])



			@classmethod
			def 							a_	(       cls	,   *__lowerCAmelCase	,   **__lowerCAmelCase):




					"""simple docstring"""


					requires_backends(cls	,   ["""torch""", """transformers""", """k_diffusion"""])







			@classmethod
			def 							a_	(       cls	,   *__lowerCAmelCase	,   **__lowerCAmelCase):




					"""simple docstring"""


					requires_backends(cls	,   ["""torch""", """transformers""", """k_diffusion"""])




