


"""simple docstring"""


from __future__ import annotations

a_											=     "Alexander Joslin"






def   a__			(					__lowercase )						->						int:

				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"""


from .hash_table import HashTable
class snake_case   (	_UpperCamelCase):







		def __init__(       self   :							Any     , *a__   :							Any     , **a__   :							Tuple		)							->    Tuple:





						'''simple docstring'''







						super().__init__(*a__     , **a__		)







		def 			a_			(       self   :							Tuple     , a__   :							int     , a__   :							str=None		)							->    Optional[int]:





						'''simple docstring'''







						_A       	=      1
						_A       	=      self.hash_function(key + i * i		)

						while self.values[new_key] is not None and self.values[new_key] != key:
										i += 1
										_A       	=      (
										    self.hash_function(key + i * i		)
										    if not self.balanced_factor() >= self.lim_charge
										    else None
										)

										if new_key is None:
														break

						return new_key