"""simple docstring"""


from __future__ import annotations

__UpperCamelCase       :    Any         =		"Alexander Joslin"


def   __UpperCAmelCase     (	_snake_case		:       int       ):

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

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

   # starting position
   _lowercase							     =       0
   for i in range(1,				_snake_case       ):
      _lowercase							     =       min(table[i + 1],				table[i] + 1       )
      # check if out of bounds
      if i * 2 <= number:
         _lowercase							     =       min(table[i * 2],				table[i] + 1       )
      # check if out of bounds
      if i * 3 <= number:
         _lowercase							     =       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   UpperCAmelCase_	(				metaclass=lowercase__   ):
    snake_case_											=      ["""torch""", """transformers""", """k_diffusion"""]
    def __init__(	self			:       Optional[Any]   ,						*_lowercase			:       Optional[int]   ,						**_lowercase			:       List[str]		)						->    Dict:
       requires_backends(self   ,						["torch", "transformers", "k_diffusion"]		)
    @classmethod
    def 		_lowerCamelCase      (	cls			:       Union[str, Any]   ,						*_lowercase			:       Any   ,						**_lowercase			:       List[Any]		)						->    str:
       requires_backends(cls   ,						["torch", "transformers", "k_diffusion"]		)




    @classmethod
    def 		_lowerCamelCase      (	cls			:       Optional[Any]   ,						*_lowercase			:       List[Any]   ,						**_lowercase			:       Any		)						->    Any:
       requires_backends(cls   ,						["torch", "transformers", "k_diffusion"]		)