

def      a      (			A__	:   int      ,   A__	:   int     )    ->      Union[str, Any]:





      """simple docstring"""



      _lowercase	       =''
      for i in table:
            res += inp[i - 1]
      return res
def      a      (			A__	:   str     )    ->      Tuple:





      """simple docstring"""



      return data[1:] + data[0]
def      a      (			A__	:   Any      ,   A__	:   Union[str, Any]     )    ->      str:





      """simple docstring"""



      _lowercase	       =''
      for i in range(len(A__     )     ):
            if a[i] == b[i]:
                  res += "0"
            else:
                  res += "1"
      return res
def      a      (			A__	:   Optional[int]      ,   A__	:   Dict     )    ->      int:





      """simple docstring"""



      _lowercase	       =int('0b' + data[0] + data[-1]      ,   2     )
      _lowercase	       =int('0b' + data[1:3]      ,   2     )
      return bin(s[row][col]     )[2:]
def      a      (			A__	:   List[Any]      ,   A__	:   Optional[int]      ,   A__	:   Tuple      ,   A__	:   Tuple      ,   A__	:   int     )    ->      Union[str, Any]:





      """simple docstring"""



      _lowercase	       =message[:4]
      _lowercase	       =message[4:]
      _lowercase	       =apply_table(A__      ,   A__     )
      _lowercase	       =xor(A__      ,   A__     )
      _lowercase	       =apply_sbox(A__      ,   temp[:4]     )  # noqa: E741
      _lowercase	       =apply_sbox(A__      ,   temp[4:]     )
      _lowercase	       ='0' * (2 - len(A__     )) + l  # noqa: E741
      _lowercase	       ='0' * (2 - len(A__     )) + r
      _lowercase	       =apply_table(l + r      ,   A__     )
      _lowercase	       =xor(A__      ,   A__     )
      return temp + right


if __name__ == "__main__":
  lowercase_									=   input('Enter 10 bit key: ')
  lowercase_									=   input('Enter 8 bit message: ')

  lowercase_									=   [6, 3, 7, 4, 8, 5, 1_0, 9]
  lowercase_									=   [3, 5, 2, 7, 4, 1_0, 1, 9, 8, 6]
  lowercase_									=   [2, 4, 3, 1]
  lowercase_									=   [2, 6, 3, 1, 4, 8, 5, 7]
  lowercase_									=   [4, 1, 3, 5, 7, 2, 8, 6]
  lowercase_									=   [4, 1, 2, 3, 2, 3, 4, 1]
  lowercase_									=   [[1, 0, 3, 2], [3, 2, 1, 0], [0, 2, 1, 3], [3, 1, 3, 2]]
  lowercase_									=   [[0, 1, 2, 3], [2, 0, 1, 3], [3, 0, 1, 0], [2, 1, 0, 3]]

  # key generation
  lowercase_									=   apply_table(key, paa_table)
  lowercase_									=   temp[:5]
  lowercase_									=   temp[5:]
  lowercase_									=   left_shift(left)
  lowercase_									=   left_shift(right)
  lowercase_									=   apply_table(left + right, pa_table)
  lowercase_									=   left_shift(left)
  lowercase_									=   left_shift(right)
  lowercase_									=   left_shift(left)
  lowercase_									=   left_shift(right)
  lowercase_									=   apply_table(left + right, pa_table)

  # encryption
  lowercase_									=   apply_table(message, IP)
  lowercase_									=   function(expansion, sa, sa, keya, temp)
  lowercase_									=   temp[4:] + temp[:4]
  lowercase_									=   function(expansion, sa, sa, keya, temp)
  lowercase_									=   apply_table(temp, IP_inv)
  print('Cipher text is:', CT)

  # decryption
  lowercase_									=   apply_table(CT, IP)
  lowercase_									=   function(expansion, sa, sa, keya, temp)
  lowercase_									=   temp[4:] + temp[:4]
  lowercase_									=   function(expansion, sa, sa, keya, temp)
  lowercase_									=   apply_table(temp, IP_inv)
  print('Plain text after decypting is:', PT)





def      a      (			A__	:   int = 1000000     )    ->      int:





      """simple docstring"""



      _lowercase	       =1
      _lowercase	       =1
      _lowercase	       ={1: 1}

      for inputa in range(2      ,   A__     ):
            _lowercase	       =0
            _lowercase	       =inputa

            while True:
                  if number in counters:
                        counter += counters[number]
                        break
                  if number % 2 == 0:
                        number //= 2
                        counter += 1
                  else:
                        _lowercase	       =(3 * number) + 1
                        counter += 1

            if inputa not in counters:
                  _lowercase	       =counter

            if counter > pre_counter:
                  _lowercase	       =inputa
                  _lowercase	       =counter
      return largest_number


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


