

from __future__ import annotations

a_         =      'Alexander Joslin'

def 	lowerCamelCase__	(   _a):




 if number <= 0:
  SCREAMING_SNAKE_CASE				: Optional[Any]			       =    f"n must be greater than 0. Got n = {number}"
  raise ValueError(_a)

 SCREAMING_SNAKE_CASE				: Optional[int]			       =    [number + 1] * (number + 1)

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


if __name__ == "__main__":
   import doctest

   doctest.testmod()


from __future__ import annotations

from typing import Any






class _UpperCamelCase							:
			'''simple docstring'''







			def __init__(     self							:	Dict , a							:	Any , a							:	Any		)							->    None:  # noqa: A002

				"""simple docstring"""

				SCREAMING_SNAKE_CASE				: str			       =    item
				SCREAMING_SNAKE_CASE				: List[Any]			       =    next






class _UpperCamelCase							:
			'''simple docstring'''







			def __init__(     self							:	Optional[int]		)							->    None:

				"""simple docstring"""

				SCREAMING_SNAKE_CASE				: Node | None			       =    None
				SCREAMING_SNAKE_CASE				: List[Any]			       =    0
			def 							__UpperCamelCase	(     self							:	Union[str, Any] , a							:	Any		)							->    None:

				"""simple docstring"""

				SCREAMING_SNAKE_CASE				: Any			       =    Node(a , self.head		)
				self.size += 1
			def 							__UpperCamelCase	(     self							:	Dict		)							->    Any:

				"""simple docstring"""

				if self.head is None:
					return None
				else:
					SCREAMING_SNAKE_CASE				: Optional[int]			       =    self.head.item
					SCREAMING_SNAKE_CASE				: Dict			       =    self.head.next
					self.size -= 1
					return item
			def 							__UpperCamelCase	(     self							:	Any		)							->    bool:

				"""simple docstring"""

				return self.head is None
			def __str__(     self							:	Union[str, Any]		)							->    str:

				"""simple docstring"""

				if self.is_empty():
					return ""
				else:
					SCREAMING_SNAKE_CASE				: Union[str, Any]			       =    self.head
					SCREAMING_SNAKE_CASE				: str			       =    ""
					SCREAMING_SNAKE_CASE				: list[str]			       =    []
					while iterate:
						item_list.append(str(iterate.item		)		)
						SCREAMING_SNAKE_CASE				: str			       =    iterate.next

					SCREAMING_SNAKE_CASE				: List[str]			       =    " --> ".join(a		)

					return item_str






			def __len__(     self							:	List[Any]		)							->    int:

				"""simple docstring"""

				return self.size