





"""simple docstring"""
class       _SCREAMING_SNAKE_CASE:




       def __init__(		self							)    ->   Optional[Any]:





             """simple docstring"""






             __SCREAMING_SNAKE_CASE     :List[str]	       =						[0]
             __SCREAMING_SNAKE_CASE     :str	       =						0




       def 					_UpperCamelCase  (		self	,SCREAMING_SNAKE_CASE__							)    ->   None:





             """simple docstring"""






             __SCREAMING_SNAKE_CASE     :Tuple	       =						self.__heap[i]
             while i // 2 > 0:
                   if self.__heap[i] > self.__heap[i // 2]:
                         __SCREAMING_SNAKE_CASE     :Optional[Any]	       =						self.__heap[i // 2]
                         __SCREAMING_SNAKE_CASE     :Optional[int]	       =						temporary
                   i //= 2




       def 					_UpperCamelCase  (		self	,SCREAMING_SNAKE_CASE__							)    ->   None:





             """simple docstring"""






             self.__heap.append(SCREAMING_SNAKE_CASE__							)
             self.__size += 1
             self.__swap_up(self.__size							)




       def 					_UpperCamelCase  (		self	,SCREAMING_SNAKE_CASE__							)    ->   None:





             """simple docstring"""






             while self.__size >= 2 * i:
                   if 2 * i + 1 > self.__size:
                         __SCREAMING_SNAKE_CASE     :Optional[Any]	       =						2 * i
                   else:
                         if self.__heap[2 * i] > self.__heap[2 * i + 1]:
                               __SCREAMING_SNAKE_CASE     :int	       =						2 * i
                         else:
                               __SCREAMING_SNAKE_CASE     :Any	       =						2 * i + 1
                   __SCREAMING_SNAKE_CASE     :int	       =						self.__heap[i]
                   if self.__heap[i] < self.__heap[bigger_child]:
                         __SCREAMING_SNAKE_CASE     :str	       =						self.__heap[bigger_child]
                         __SCREAMING_SNAKE_CASE     :Dict	       =						temporary
                   __SCREAMING_SNAKE_CASE     :int	       =						bigger_child




       def 					_UpperCamelCase  (		self							)    ->   int:





             """simple docstring"""






             __SCREAMING_SNAKE_CASE     :Dict	       =						self.__heap[1]
             __SCREAMING_SNAKE_CASE     :str	       =						self.__heap[self.__size]
             self.__size -= 1
             self.__heap.pop()
             self.__swap_down(1							)
             return max_value




       @property
       def 					_UpperCamelCase  (		self							)    ->   List[Any]:





             """simple docstring"""






             return self.__heap[1:]




       def __len__(		self							)    ->   Optional[int]:





             """simple docstring"""






             return self.__size


if __name__ == "__main__":
  import doctest

  doctest.testmod()
  # create an instance of BinaryHeap
  lowerCamelCase_          =	BinaryHeap()
  binary_heap.insert(6)
  binary_heap.insert(1_0)
  binary_heap.insert(1_5)
  binary_heap.insert(1_2)
  # pop root(max-values because it is max heap)
  print(binary_heap.pop())  # 15
  print(binary_heap.pop())  # 12
  # get the list and size after operations
  print(binary_heap.get_list)
  print(len(binary_heap))






"""simple docstring"""
def   __lowerCamelCase     (							a_  :	int = 10**6							)    ->   int:

      if n <= 0:
            raise ValueError('''Please enter an integer greater than 0'''							)

      __SCREAMING_SNAKE_CASE     :Tuple	       =						list(range(n + 1							)							)
      for number in range(2				,     n + 1							):
            if phi[number] == number:
                  phi[number] -= 1
                  for multiple in range(number * 2				,     n + 1				,     a_							):
                        __SCREAMING_SNAKE_CASE     :List[Any]	       =						(phi[multiple] // number) * (number - 1)

      __SCREAMING_SNAKE_CASE     :Optional[Any]	       =						1
      for number in range(1				,     n + 1							):
            if (answer / phi[answer]) < (number / phi[number]):
                  __SCREAMING_SNAKE_CASE     :str	       =						number

      return answer


if __name__ == "__main__":
  print(solution())