






"""simple docstring"""






def  __lowerCamelCase					(					lowerCAmelCase__ = 100_0000				):
				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())))










"""simple docstring"""






from typing import Union

import fire
import torch
from tqdm import tqdm



def  __lowerCamelCase					(					lowerCAmelCase__       ,lowerCAmelCase__ = "cpu"       ,lowerCAmelCase__ = None				):
				A__							 =       torch.load(lowerCAmelCase__       ,map_location=lowerCAmelCase__				)
				for k, v in tqdm(state_dict.items()				):
								if not isinstance(lowerCAmelCase__       ,torch.Tensor				):
												raise TypeError('FP16 conversion only works on paths that are saved state dicts, like pytorch_model.bin'				)
								A__							 =       v.half()
				if save_path is None:  # overwrite src_path
								A__							 =       src_path
				torch.save(lowerCAmelCase__       ,lowerCAmelCase__				)


if __name__ == "__main__":
					fire.Fire(convert)


