




'''simple docstring'''
def 				snake_case_  (   a__		:	list			):



    """simple docstring"""




    if not isinstance(a__    ,a__			):
        raise ValueError("""Input series is not valid, valid series - [2, 4, 8]"""			)
    if len(a__			) == 0:
        raise ValueError("""Input list must be a non empty list"""			)
    if len(a__			) == 1:
        return True
    try:
        __lowercase							=						series[1] / series[0]
        for index in range(len(a__			) - 1			):
            if series[index + 1] / series[index] != common_ratio:
                return False
    except ZeroDivisionError:
        return False
    return True
def 				snake_case_  (   a__		:	list			):



    """simple docstring"""




    if not isinstance(a__    ,a__			):
        raise ValueError("""Input series is not valid, valid series - [2, 4, 8]"""			)
    if len(a__			) == 0:
        raise ValueError("""Input list must be a non empty list"""			)
    __lowercase							=						1
    for value in series:
        answer *= value
    return pow(a__    ,1 / len(a__			)			)


if __name__ == "__main__":
  import doctest

  doctest.testmod()










'''simple docstring'''
from __future__ import annotations

A							:      List[str] 	=       {1: 1}
def 				snake_case_  (   a__		:	int			):



    """simple docstring"""




    if n in COLLATZ_SEQUENCE_LENGTHS:
        return COLLATZ_SEQUENCE_LENGTHS[n]
    __lowercase							=						n // 2 if n % 2 == 0 else 3 * n + 1
    __lowercase							=						collatz_sequence_length(a__			) + 1
    __lowercase							=						sequence_length
    return sequence_length
def 				snake_case_  (   a__		:	int = 1_00_00_00			):



    """simple docstring"""




    __lowercase							=						max((collatz_sequence_length(a__			), i) for i in range(1    ,a__			)			)
    return result[1]


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




