





"""simple docstring"""




from __future__ import annotations

UpperCamelCase_     ="""Alexander Joslin"""





def  a_       (							_lowercase     ):

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

						_UpperCamelCase    :      int						     =					[number + 1] * (number + 1)

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


if __name__ == "__main__":
						import doctest

						doctest.testmod()










"""simple docstring"""




def  a_       (							_lowercase ,		_lowercase     ):
						sequence.append(_lowercase     )

						_UpperCamelCase    :      int						     =					0
						while sequence[index] != target:
												index += 1

						sequence.pop()

						if index == len(_lowercase     ):
												return None

						return index


if __name__ == "__main__":
						UpperCamelCase_     =input("""Enter numbers separated by comma:\n""").strip()
						UpperCamelCase_     =[int(item) for item in user_input.split(""",""")]

						UpperCamelCase_     =input("""Enter a single number to be found in the list:\n""")
						UpperCamelCase_     =int(target_input)
						UpperCamelCase_     =sentinel_linear_search(sequence, target)
						if result is not None:
												print(F"{target} found at positions: {result}")
						else:
												print("""Not found""")



