






"""simple docstring"""



from __future__ import annotations

_lowerCAmelCase     :     str            =	{1: 1}


def      SCREAMING_SNAKE_CASE__    (   snake_case    :      int							)->						int:






     '''simple docstring'''



     if n in COLLATZ_SEQUENCE_LENGTHS:
          return COLLATZ_SEQUENCE_LENGTHS[n]
     UpperCAmelCase__		:  int				=				n // 2 if n % 2 == 0 else 3 * n + 1
     UpperCAmelCase__		:  List[str]				=				collatz_sequence_length(snake_case							) + 1
     UpperCAmelCase__		:  List[Any]				=				sequence_length
     return sequence_length


def      SCREAMING_SNAKE_CASE__    (   snake_case    :      int = 100_0000							)->						int:






     '''simple docstring'''



     UpperCAmelCase__		:  Optional[int]				=				max((collatz_sequence_length(snake_case							), i) for i in range(1       , snake_case							)							)
     return result[1]


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










"""simple docstring"""



import unittest

import torch

from diffusers import DDIMScheduler, TextToVideoZeroPipeline
from diffusers.utils import load_pt, require_torch_gpu, slow

from ..test_pipelines_common import assert_mean_pixel_difference




@slow
@require_torch_gpu
class        lowerCAmelCase__       (  unittest.TestCase					):
   def 	__a				(						self	:     Optional[Any]				):


        '''simple docstring'''
        UpperCAmelCase__		:  int				=				"runwayml/stable-diffusion-v1-5"
        UpperCAmelCase__		:  Optional[Any]				=				TextToVideoZeroPipeline.from_pretrained(snake_case__				,       torch_dtype=torch.floataa				).to("cuda"				)
        UpperCAmelCase__		:  Any				=				DDIMScheduler.from_config(pipe.scheduler.config				)
        UpperCAmelCase__		:  Optional[Any]				=				torch.Generator(device="cuda"				).manual_seed(0				)

        UpperCAmelCase__		:  Any				=				"A bear is playing a guitar on Times Square"
        UpperCAmelCase__		:  Dict				=				pipe(prompt=snake_case__				,       generator=snake_case__				).images

        UpperCAmelCase__		:  List[Any]				=				load_pt(
            "https://huggingface.co/datasets/hf-internal-testing/diffusers-images/resolve/main/text-to-video/A bear is playing a guitar on Times Square.pt"				)

        assert_mean_pixel_difference(snake_case__				,       snake_case__				)


