





"""simple docstring"""




import numpy as np
from sklearn.datasets import fetch_california_housing
from sklearn.metrics import mean_absolute_error, mean_squared_error
from sklearn.model_selection import train_test_split
from xgboost import XGBRegressor



def 					a__				(       snake_case__       )		->      tuple:
			return (data["data"], data["target"])



def 					a__				(       snake_case__ ,				snake_case__ ,				snake_case__       )		->      np.ndarray:
			lowerCamelCase       =      XGBRegressor(verbosity=0 ,				random_state=42       )
			xgb.fit(snake_case__ ,				snake_case__       )
			# Predict target for test data
			lowerCamelCase       =      xgb.predict(snake_case__       )
			lowerCamelCase       =      predictions.reshape(len(snake_case__       ) ,				1       )
			return predictions



def 					a__				(       )		->      None:
			lowerCamelCase       =      fetch_california_housing()
			lowerCamelCase   ,     lowerCamelCase       =      data_handling(snake_case__       )
			lowerCamelCase   ,     lowerCamelCase   ,     lowerCamelCase   ,     lowerCamelCase       =      train_test_split(
			    snake_case__ ,				snake_case__ ,				test_size=0.25 ,				random_state=1       )
			lowerCamelCase       =      xgboost(snake_case__ ,				snake_case__ ,				snake_case__       )
			# Error printing
			print(F'Mean Absolute Error : {mean_absolute_error(snake_case__ ,				snake_case__       )}'       )
			print(F'Mean Square Error  : {mean_squared_error(snake_case__ ,				snake_case__       )}'       )


if __name__ == "__main__":
					import doctest

					doctest.testmod(verbose=True)
					main()









"""simple docstring"""




def 					a__				(       snake_case__ = 1_00_00_00       )		->      int:
			lowerCamelCase       =      1
			lowerCamelCase       =      1
			lowerCamelCase       =      {1: 1}

			for inputa in range(2 ,				snake_case__       ):
						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())))



