output_description: Print the minimum integer m that satisfies the condition.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      s
attempt: s = int(input())
  def functionF(n):
      result = n/2 if n % 2 == 0 else 3 * n + 1
      return int(result)
  def calc(s):
    array = []
    for i in range(1,1000000):
      if i == 1:
        array.append(s)
        elif i > 1:
          array.append(functionF(array[i - 2]))
          return array
  def result(s):
      result = calc(s)
      for i in range(1, 1000000):
  #         print('i',i)
          for k in range(i):
  #             print('k',k)
  #             print(result[i], result[k])
              if result[i] == result[k]:
                  print(i - 1)
                  return
problem_description: Statement
  
  A sequence a=\\{a_1,a_2,a_3,......\\} is determined as follows:
  
    * The first term s is given as input.
  
    * Let f(n) be the following function: f(n) = n/2 if n is even, and f(n) = 3n+1 if n is odd.
  
    * a_i = s when i = 1, and a_i = f(a_{i-1}) when i > 1.
  
  Find the minimum integer m that satisfies the following condition:
  
    * There exists an integer n such that a_m = a_n (m > n).
samples: [{"input": "8", "output": "5\n    \n\na=\\\\{8,4,2,1,4,2,1,4,2,1,......\\\\}. As a_5=a_2, the answer is 5.\n\n* * *"}, {"input": "7", "output": "18\n    \n\na=\\\\{7,22,11,34,17,52,26,13,40,20,10,5,16,8,4,2,1,4,2,1,......\\\\}.\n\n* * *"}, {"input": "54", "output": "114"}]