

'''simple docstring'''






import math


def 					__lowerCamelCase			(      SCREAMING_SNAKE_CASE_     :	Optional[Any]    )							->   int:
      """simple docstring"""

      return sum(int(SCREAMING_SNAKE_CASE_    ) for digit in str(SCREAMING_SNAKE_CASE_    )    )


def 					__lowerCamelCase			(      SCREAMING_SNAKE_CASE_     :	Tuple = 3_0    )							->   int:
      """simple docstring"""

      SCREAMING_SNAKE_CASE_      :			Optional[int]     =       []
      for digit in range(2  ,  1_0_0    ):
            for power in range(2  ,  1_0_0    ):
                  SCREAMING_SNAKE_CASE_      :			Optional[int]     =       int(math.pow(SCREAMING_SNAKE_CASE_  ,  SCREAMING_SNAKE_CASE_    )    )
                  if digit == digit_sum(SCREAMING_SNAKE_CASE_    ):
                        digit_to_powers.append(SCREAMING_SNAKE_CASE_    )

      digit_to_powers.sort()
      return digit_to_powers[n - 1]


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





'''simple docstring'''






from .hash_table import HashTable
from .number_theory.prime_numbers import is_prime, next_prime




class 		a__				(							a__  ):





							'''simple docstring'''






							def __init__(		self					,    *lowerCamelCase_					,    **lowerCamelCase_   )       ->							Optional[int]:
														super().__init__(*lowerCamelCase_					,    **lowerCamelCase_   )







							def   __SCREAMING_SNAKE_CASE							(		self					,    lowerCamelCase_					,    lowerCamelCase_   )       ->							Optional[int]:
														lowerCAmelCase__          =	(
														    next_prime(value % self.size_table   )
														    if not is_prime(value % self.size_table   )
														    else value % self.size_table
														)  # gt = bigger than
														return next_prime_gt - (data % next_prime_gt)







							def   __SCREAMING_SNAKE_CASE							(		self					,    lowerCamelCase_					,    lowerCamelCase_					,    lowerCamelCase_   )       ->							Optional[int]:
														return (increment * self.__hash_function_a(lowerCamelCase_					,    lowerCamelCase_   )) % self.size_table







							def   __SCREAMING_SNAKE_CASE							(		self					,    lowerCamelCase_					,    lowerCamelCase_=None   )       ->							Any:
														lowerCAmelCase__          =	1
														lowerCAmelCase__          =	self.hash_function(lowerCamelCase_   )

														while self.values[new_key] is not None and self.values[new_key] != key:
																					lowerCAmelCase__          =	(
																					    self.__hash_double_function(lowerCamelCase_					,    lowerCamelCase_					,    lowerCamelCase_   )
																					    if self.balanced_factor() >= self.lim_charge
																					    else None
																					)
																					if new_key is None:
																												break
																					else:
																												i += 1

														return new_key