


"""simple docstring"""






from dataclasses import dataclass
from typing import Callable, Optional

import datasets


@dataclass
class 			SCREAMING_SNAKE_CASE_  (   datasets.BuilderConfig):




							'''simple docstring'''





							__magic_name__					:     Dict				  =  None
							__magic_name__					:     Dict				  =  None
							__magic_name__					:     Optional[Any]				  =  None




							def        UpperCAmelCase (						self)   ->	str:







								'''simple docstring'''




								assert self.generator is not None, "generator must be specified"

								if self.gen_kwargs is None:
									snake_case__  :						Optional[int]		=      {}


class 			SCREAMING_SNAKE_CASE_  (   datasets.GeneratorBasedBuilder):




							'''simple docstring'''





							__magic_name__					:     Optional[Any]				  =  GeneratorConfig




							def        UpperCAmelCase (						self)   ->	Tuple:







								'''simple docstring'''




								return datasets.DatasetInfo(features=self.config.features)




							def        UpperCAmelCase (						self	,					lowerCamelCase__)   ->	Dict:







								'''simple docstring'''




								return [datasets.SplitGenerator(name=datasets.Split.TRAIN	,					gen_kwargs=self.config.gen_kwargs)]







							def        UpperCAmelCase (						self	,					**lowerCamelCase__)   ->	Dict:







								'''simple docstring'''




								for idx, ex in enumerate(self.config.generator(**__lowerCamelCase)):
									yield idx, ex













"""simple docstring"""

from __future__ import annotations

lowercase           =							{1: 1}






def _lowerCAmelCase						(	__lowerCamelCase:int ):

						'''simple docstring'''






						if n in COLLATZ_SEQUENCE_LENGTHS:
												return COLLATZ_SEQUENCE_LENGTHS[n]
						__magic_name__      =  n // 2 if n % 2 == 0 else 3 * n + 1
						__magic_name__      =  collatz_sequence_length(__lowerCamelCase ) + 1
						__magic_name__      =  sequence_length
						return sequence_length






def _lowerCAmelCase						(	__lowerCamelCase:int = 1_0_0_0_0_0_0 ):

						'''simple docstring'''






						__magic_name__      =  max((collatz_sequence_length(__lowerCamelCase ), i) for i in range(1			,    __lowerCamelCase ) )
						return result[1]


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



