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: A = [
      0,
      5,
      5,
      9,
      5,
      7,
      10,
      18,
      5,
      21,
      8,
      16,
      11,
      11,
      19,
      19,
      6,
      14,
      22,
      22,
      9,
      9,
      17,
      17,
      12,
      25,
      12,
      113,
      20,
      20,
      20,
      108,
      7,
      28,
      15,
      15,
      23,
      23,
      23,
      36,
      10,
      111,
      10,
      31,
      18,
      18,
      18,
      106,
      13,
      26,
      26,
      26,
      13,
      13,
      114,
      114,
      21,
      34,
      21,
      34,
      21,
      21,
      109,
      109,
      8,
      29,
      29,
      29,
      16,
      16,
      16,
      104,
      24,
      117,
      24,
      16,
      24,
      24,
      37,
      37,
      11,
      24,
      112,
      112,
      11,
      11,
      32,
      32,
      19,
      32,
      19,
      94,
      19,
      19,
      107,
      107,
      14,
      120,
      27,
      27,
      27,
  ]
  
  print(A[int(input())])
  
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"}]