



from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_tokenizers_available, is_torch_available


_lowercase:					Optional[Any]      =						{
    "configuration_realm": ["REALM_PRETRAINED_CONFIG_ARCHIVE_MAP", "RealmConfig"],
    "tokenization_realm": ["RealmTokenizer"],
}

try:
				if not is_tokenizers_available():
								raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
				pass
else:
				_lowercase:					Tuple      =						["RealmTokenizerFast"]

try:
				if not is_torch_available():
								raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
				pass
else:
				_lowercase:					int      =						[
				    "REALM_PRETRAINED_MODEL_ARCHIVE_LIST",
				    "RealmEmbedder",
				    "RealmForOpenQA",
				    "RealmKnowledgeAugEncoder",
				    "RealmPreTrainedModel",
				    "RealmReader",
				    "RealmScorer",
				    "load_tf_weights_in_realm",
				]
				_lowercase:					List[str]      =						["RealmRetriever"]


if TYPE_CHECKING:
				from .configuration_realm import REALM_PRETRAINED_CONFIG_ARCHIVE_MAP, RealmConfig
				from .tokenization_realm import RealmTokenizer

				try:
								if not is_tokenizers_available():
												raise OptionalDependencyNotAvailable()
				except OptionalDependencyNotAvailable:
								pass
				else:
								from .tokenization_realm import RealmTokenizerFast

				try:
								if not is_torch_available():
												raise OptionalDependencyNotAvailable()
				except OptionalDependencyNotAvailable:
								pass
				else:
								from .modeling_realm import (
								    REALM_PRETRAINED_MODEL_ARCHIVE_LIST,
								    RealmEmbedder,
								    RealmForOpenQA,
								    RealmKnowledgeAugEncoder,
								    RealmPreTrainedModel,
								    RealmReader,
								    RealmScorer,
								    load_tf_weights_in_realm,
								)
								from .retrieval_realm import RealmRetriever


else:
				import sys

				_lowercase:					Any      =						_LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)

import math







def 						UpperCAmelCase							(		lowerCAmelCase_							)						->						int:
     return sum(int(lowerCAmelCase_							) for digit in str(lowerCAmelCase_							)							)







def 						UpperCAmelCase							(		lowerCAmelCase_ = 3_0							)						->						int:
     a	:     Optional[int]						      =    []
     for digit in range(2    ,   1_0_0							):
          for power in range(2    ,   1_0_0							):
               a	:     List[str]						      =    int(math.pow(lowerCAmelCase_    ,   lowerCAmelCase_							)							)
               if digit == digit_sum(lowerCAmelCase_							):
                    digit_to_powers.append(lowerCAmelCase_							)

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


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