



_snake_case	=						frozenset(
    [
        "prompt",
        "height",
        "width",
        "guidance_scale",
        "negative_prompt",
        "prompt_embeds",
        "negative_prompt_embeds",
        "cross_attention_kwargs",
    ]
)

_snake_case	=						frozenset(["prompt", "negative_prompt"])

_snake_case	=						frozenset([])

_snake_case	=						frozenset(["image"])

_snake_case	=						frozenset(
    [
        "image",
        "height",
        "width",
        "guidance_scale",
    ]
)

_snake_case	=						frozenset(["image"])

_snake_case	=						frozenset(
    [
        "prompt",
        "image",
        "height",
        "width",
        "guidance_scale",
        "negative_prompt",
        "prompt_embeds",
        "negative_prompt_embeds",
    ]
)

_snake_case	=						frozenset(["prompt", "image", "negative_prompt"])

_snake_case	=						frozenset(
    [
        # Text guided image variation with an image mask
        "prompt",
        "image",
        "mask_image",
        "height",
        "width",
        "guidance_scale",
        "negative_prompt",
        "prompt_embeds",
        "negative_prompt_embeds",
    ]
)

_snake_case	=						frozenset(["prompt", "image", "mask_image", "negative_prompt"])

_snake_case	=						frozenset(
    [
        # image variation with an image mask
        "image",
        "mask_image",
        "height",
        "width",
        "guidance_scale",
    ]
)

_snake_case	=						frozenset(["image", "mask_image"])

_snake_case	=						frozenset(
    [
        "example_image",
        "image",
        "mask_image",
        "height",
        "width",
        "guidance_scale",
    ]
)

_snake_case	=						frozenset(["example_image", "image", "mask_image"])

_snake_case	=						frozenset(["class_labels"])

_snake_case	=						frozenset(["class_labels"])

_snake_case	=						frozenset(["batch_size"])

_snake_case	=						frozenset([])

_snake_case	=						frozenset(["batch_size"])

_snake_case	=						frozenset([])

_snake_case	=						frozenset(
    [
        "prompt",
        "audio_length_in_s",
        "guidance_scale",
        "negative_prompt",
        "prompt_embeds",
        "negative_prompt_embeds",
        "cross_attention_kwargs",
    ]
)

_snake_case	=						frozenset(["prompt", "negative_prompt"])
_snake_case	=						frozenset(["input_tokens"])

_snake_case	=						frozenset(["input_tokens"])





def        A       (      _lowerCamelCase = 1_000_000						):





							'''simple docstring'''




							_lowerCAmelCase  :							Any				     =					1
							_lowerCAmelCase  :							Optional[Any]				     =					1
							_lowerCAmelCase  :							List[str]				     =					{1: 1}

							for inputa in range(2       ,				_lowerCamelCase						):
														_lowerCAmelCase  :							int				     =					0
														_lowerCAmelCase  :							Any				     =					inputa

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

														if inputa not in counters:
																					_lowerCAmelCase  :							Tuple				     =					counter

														if counter > pre_counter:
																					_lowerCAmelCase  :							Union[str, Any]				     =					inputa
																					_lowerCAmelCase  :							Union[str, Any]				     =					counter
							return largest_number


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