





"""simple docstring"""




def 	a_    (							_lowercase = 100_0000       ):
						_UpperCamelCase      : Dict         =   1
						_UpperCamelCase      : Optional[int]         =   1
						_UpperCamelCase      : List[str]         =   {1: 1}

						for inputa in range(2	,						_lowercase       ):
												_UpperCamelCase      : List[Any]         =   0
												_UpperCamelCase      : List[str]         =   inputa

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

												if inputa not in counters:
																		_UpperCamelCase      : List[str]         =   counter

												if counter > pre_counter:
																		_UpperCamelCase      : str         =   inputa
																		_UpperCamelCase      : Optional[Any]         =   counter
						return largest_number


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










"""simple docstring"""




def 	a_    (							_lowercase	,						_lowercase       ):
						if discount_rate < 0:
												raise ValueError('''Discount rate cannot be negative'''       )
						if not cash_flows:
												raise ValueError('''Cash flows list cannot be empty'''       )
						_UpperCamelCase      : Optional[int]         =   sum(
						    cash_flow / ((1 + discount_rate) ** i) for i, cash_flow in enumerate(_lowercase       )       )
						return round(_lowercase	,						ndigits=2       )


if __name__ == "__main__":
						import doctest

						doctest.testmod()



