

from __future__ import annotations







def      snake_case__							(  lowerCAmelCase_     ):





     """simple docstring"""







     for r in range(1,       lowerCAmelCase_     ):
          SCREAMING_SNAKE_CASE 		=[]
          for x in range(n - 1     ):
               SCREAMING_SNAKE_CASE 		=pow(lowerCAmelCase_,       lowerCAmelCase_,       lowerCAmelCase_     )
               if val in li:
                    break
               li.append(lowerCAmelCase_     )
          else:
               return r
     return None


if __name__ == "__main__":
 _lowerCamelCase							=int(input("Enter a prime number q: "))
 _lowerCamelCase							=find_primitive(q)
 if a is None:
  print(f'Cannot find the primitive for the value: {a!r}')
 else:
  _lowerCamelCase							=int(input("Enter private key of A: "))
  _lowerCamelCase							=pow(a, a_private, q)
  _lowerCamelCase							=int(input("Enter private key of B: "))
  _lowerCamelCase							=pow(a, b_private, q)

  _lowerCamelCase							=pow(b_public, a_private, q)
  _lowerCamelCase							=pow(a_public, b_private, q)

  print("The key value generated by A is: ", a_secret)
  print("The key value generated by B is: ", b_secret)




from __future__ import annotations

_lowerCamelCase							={1: 1}







def      snake_case__							(  lowerCAmelCase_     ):





     """simple docstring"""







     if n in COLLATZ_SEQUENCE_LENGTHS:
          return COLLATZ_SEQUENCE_LENGTHS[n]
     SCREAMING_SNAKE_CASE 		=n // 2 if n % 2 == 0 else 3 * n + 1
     SCREAMING_SNAKE_CASE 		=collatz_sequence_length(lowerCAmelCase_     ) + 1
     SCREAMING_SNAKE_CASE 		=sequence_length
     return sequence_length







def      snake_case__							(  lowerCAmelCase_ = 1000000     ):





     """simple docstring"""







     SCREAMING_SNAKE_CASE 		=max((collatz_sequence_length(lowerCAmelCase_     ), i) for i in range(1,       lowerCAmelCase_     )     )
     return result[1]


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

