
from __future__ import annotations

lowerCamelCase_				:							List[str]       =    """Alexander Joslin"""
def        __lowercase(							__snake_case				:		int					)       ->   int:




       if number <= 0:
              __snake_case						       =   f'''n must be greater than 0. Got n = {number}'''
              raise ValueError(lowerCAmelCase__					)

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

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


if __name__ == "__main__":
 import doctest

 doctest.testmod()





"""simple docstring"""







import pytest

from datasets.utils.version import Version

@pytest.mark.parametrize(
    'other, expected_equality'       ,  [
        (Version('1.0.0'		), True),
        ('1.0.0', True),
        (Version('2.0.0'		), False),
        ('2.0.0', False),
        ('1', False),
        ('a', False),
        (1, False),
        (None, False),
    ]       ,  )
def 							UpperCamelCase_       (       lowerCAmelCase__ :							List[Any]       ,  lowerCAmelCase__ :							List[Any]		)		->  Tuple:

  """simple docstring"""




  lowerCAmelCase_  :							List[str]								=					Version('1.0.0'		)
  assert (version == other) is expected_equality
  assert (version != other) is not expected_equality
  assert (hash(lowerCAmelCase__		) == hash(lowerCAmelCase__		)) is expected_equality





