from __future__ import annotations

UpperCamelCase      			=     {1: 1}



def    lowerCamelCase_   (  _lowercase    )							->	int:
  if n in COLLATZ_SEQUENCE_LENGTHS:
    return COLLATZ_SEQUENCE_LENGTHS[n]
  __A							:   Union[str, Any]	  =				n // 2 if n % 2 == 0 else 3 * n + 1
  __A							:   Optional[Any]	  =				collatz_sequence_length(_lowercase    ) + 1
  __A							:   Any	  =				sequence_length
  return sequence_length



def    lowerCamelCase_   (  _lowercase = 1_000_000    )							->	int:
  __A							:   Optional[int]	  =				max((collatz_sequence_length(_lowercase    ), i) for i in range(1 ,     _lowercase    )    )
  return result[1]


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






import os



def    lowerCamelCase_   (  )							->	List[str]:
		__A							:   Any	  =				0
		__A							:   Any	  =				0
		with open(os.path.dirname(_lowercase    ) + "/p022_names.txt"    ) as file:
				__A							:   int	  =				str(file.readlines()[0]    )
				__A							:   Optional[Any]	  =				name.replace("\"" ,     ""    ).split(","    )

		name.sort()
		for i in range(len(_lowercase    )    ):
				for j in name[i]:
						temp_sum += ord(_lowercase    ) - ord("A"    ) + 1
				total_sum += (i + 1) * temp_sum
				__A							:   List[Any]	  =				0
		return total_sum


if __name__ == "__main__":
					print(solution())





