

from .imports import is_tqdm_available


if is_tqdm_available():
      from tqdm.auto import tqdm as _tqdm

from ..state import PartialState


def 							__lowerCAmelCase     (							_UpperCamelCase		:	Tuple = True		,				*_UpperCamelCase		:	Optional[int]		,				**_UpperCamelCase		:	Union[str, Any]						)		->				Optional[int]:
 '''simple docstring'''


 if not is_tqdm_available():
  raise ImportError('Accelerate\'s `tqdm` module requires `tqdm` to be installed. Please run `pip install tqdm`.'						)
 SCREAMING_SNAKE_CASE		    =      False
 if main_process_only:
  SCREAMING_SNAKE_CASE		    =      PartialState().local_process_index == 0
 return _tqdm(*lowerCAmelCase__		,				**lowerCAmelCase__		,				disable=lowerCAmelCase__						)





def  a   (lowerCAmelCase__ = 1_000_000   ):
   __a					=  1
   __a					=  1
   __a					=  {1: 1}

   for inputa in range(2		,				lowerCAmelCase__   ):
      __a					=  0
      __a					=  inputa

      while True:
         if number in counters:
            counter += counters[number]
            break
         if number % 2 == 0:
            number //= 2
            counter += 1
         else:
            __a					=  (3 * number) + 1
            counter += 1

      if inputa not in counters:
         __a					=  counter

      if counter > pre_counter:
         __a					=  inputa
         __a					=  counter
   return largest_number


if __name__ == "__main__":
  print(solution(int(input().strip())))



