



"""simple docstring"""
import shutil

import requests
def   A_    (     _lowercase,   _lowercase = False,   _lowercase = "."      ):







						'''simple docstring'''


						snake_case_					:List[str]		=     """https://api.nasa.gov/planetary/apod"""
						return requests.get(_lowercase,   params={"""api_key""": api_key}      ).json()
def   A_    (     _lowercase,   _lowercase = "."      ):







						'''simple docstring'''


						snake_case_					:int		=     get_apod_data(_lowercase      )
						snake_case_					:Optional[int]		=     apod_data["""url"""]
						snake_case_					:List[str]		=     img_url.split("""/"""      )[-1]
						snake_case_					:Union[str, Any]		=     requests.get(_lowercase,   stream=_lowercase      )

						with open(f"""{path}/{img_name}""",   """wb+"""      ) as img_file:
												shutil.copyfileobj(response.raw,   _lowercase      )
						del response
						return apod_data
def   A_    (     _lowercase      ):







						'''simple docstring'''


						snake_case_					:Any		=     """https://images-api.nasa.gov/search"""
						return requests.get(_lowercase,   params={"""q""": query}      ).json()


if __name__ == "__main__":
						print(save_apod("YOUR API KEY"))
						__a           =							get_archive_data("apollo 2011")["collection"]["items"]
						print(apollo_aaaa_items[0]["data"][0]["description"])





from __future__ import annotations

__snake_case		:Union[str, Any] 						=	{1: 1}





def 	__snake_case      (     _UpperCAmelCase							):
    if n in COLLATZ_SEQUENCE_LENGTHS:
        return COLLATZ_SEQUENCE_LENGTHS[n]
    __a					=							n // 2 if n % 2 == 0 else 3 * n + 1
    __a					=							collatz_sequence_length(_UpperCAmelCase							) + 1
    __a					=							sequence_length
    return sequence_length





def 	__snake_case      (     _UpperCAmelCase = 1000000							):
    __a					=							max((collatz_sequence_length(_UpperCAmelCase							), i) for i in range(1  ,					_UpperCAmelCase							)							)
    return result[1]


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





