




from ...utils import (
    OptionalDependencyNotAvailable,
    is_flax_available,
    is_torch_available,
    is_transformers_available,
)


try:
						if not (is_transformers_available() and is_torch_available()):
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						from ...utils.dummy_torch_and_transformers_objects import *  # noqa F403
else:
						from .multicontrolnet import MultiControlNetModel
						from .pipeline_controlnet import StableDiffusionControlNetPipeline
						from .pipeline_controlnet_imgaimg import StableDiffusionControlNetImgaImgPipeline
						from .pipeline_controlnet_inpaint import StableDiffusionControlNetInpaintPipeline


if is_transformers_available() and is_flax_available():
						from .pipeline_flax_controlnet import FlaxStableDiffusionControlNetPipeline










def __UpperCamelCase			(       _A = 1000000  ):
						lowerCAmelCase_      			=  1
						lowerCAmelCase_      			=  1
						lowerCAmelCase_      			=  {1: 1}

						for inputa in range(2 ,  _A  ):
												lowerCAmelCase_      			=  0
												lowerCAmelCase_      			=  inputa

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

												if inputa not in counters:
																		lowerCAmelCase_      			=  counter

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


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




