


from __future__ import annotations



def      _lowerCAmelCase  (							lowerCAmelCase_							:list							)->int | float:
   '''simple docstring'''






   snake_case_         =   sorted(lowerCAmelCase_							)
   snake_case_         =   len(lowerCAmelCase_							)
   snake_case_         =   length >> 1
   return (
       (sorted_list[mid_index] + sorted_list[mid_index - 1]) / 2
       if length % 2 == 0
       else sorted_list[mid_index]
   )



def      _lowerCAmelCase  (							)->int:
   '''simple docstring'''






   import doctest

   doctest.testmod()


if __name__ == "__main__":
   main()








def      _lowerCAmelCase  (							lowerCAmelCase_							:Dict						,  lowerCAmelCase_							:Optional[int]						,  lowerCAmelCase_							:Tuple							)->Optional[Any]:
   '''simple docstring'''






   assert b != 0, "This cannot accept modulo that is == 0"
   if n == 0:
      return 1

   if n % 2 == 1:
      return (bin_exp_mod(lowerCAmelCase_						,  n - 1						,  lowerCAmelCase_							) * a) % b

   snake_case_         =   bin_exp_mod(lowerCAmelCase_						,  n / 2						,  lowerCAmelCase_							)
   return (r * r) % b


if __name__ == "__main__":
   try:
      SCREAMING_SNAKE_CASE		:str											=       int(input('''Enter Base : ''').strip())
      SCREAMING_SNAKE_CASE		:List[Any]											=       int(input('''Enter Power : ''').strip())
      SCREAMING_SNAKE_CASE		:Dict											=       int(input('''Enter Modulo : ''').strip())
   except ValueError:
      print('''Invalid literal for integer''')

   print(bin_exp_mod(BASE, POWER, MODULO))




