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())
  ans_list = {
      1: 4,
      2: 4,
      3: 9,
      4: 4,
      5: 7,
      6: 10,
      7: 18,
      8: 5,
      9: 21,
      10: 8,
      11: 16,
      12: 11,
      13: 11,
      14: 19,
      15: 19,
      16: 6,
      17: 14,
      18: 22,
      19: 22,
      20: 9,
      21: 9,
      22: 17,
      23: 17,
      24: 12,
      25: 25,
      26: 12,
      27: 113,
      28: 20,
      29: 20,
      30: 20,
      31: 108,
      32: 7,
      33: 28,
      34: 15,
      35: 15,
      36: 23,
      37: 23,
      38: 23,
      39: 36,
      40: 10,
      41: 111,
      42: 10,
      43: 31,
      44: 18,
      45: 18,
      46: 18,
      47: 106,
      48: 13,
      49: 26,
      50: 26,
      51: 26,
      52: 13,
      53: 13,
      54: 114,
      55: 114,
      56: 21,
      57: 34,
      58: 21,
      59: 34,
      60: 21,
      61: 21,
      62: 109,
      63: 109,
      64: 8,
      65: 29,
      66: 29,
      67: 29,
      68: 16,
      69: 16,
      70: 16,
      71: 104,
      72: 24,
      73: 117,
      74: 24,
      75: 16,
      76: 24,
      77: 24,
      78: 37,
      79: 37,
      80: 11,
      81: 24,
      82: 112,
      83: 112,
      84: 11,
      85: 11,
      86: 32,
      87: 32,
      88: 19,
      89: 32,
      90: 19,
      91: 94,
      92: 19,
      93: 19,
      94: 107,
      95: 107,
      96: 14,
      97: 120,
      98: 27,
      99: 27,
      100: 27,
  }
  # トンデモナイクソコード
  print(ans_list[s])
  
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"}]