





"""simple docstring"""




import math





def 		UpperCAmelCase__						(	_UpperCAmelCase   ):






  """simple docstring"""





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





def 		UpperCAmelCase__						(	_UpperCAmelCase = 30   ):






  """simple docstring"""





  A_    :			int									=    []
  for digit in range(2					,   100   ):
    for power in range(2					,   100   ):
      A_    :			Any									=    int(math.pow(_UpperCAmelCase					,   _UpperCAmelCase   )   )
      if digit == digit_sum(_UpperCAmelCase   ):
        digit_to_powers.append(_UpperCAmelCase   )

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


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



import unittest
import warnings
from dataclasses import dataclass

from transformers.convert_slow_tokenizer import SpmConverter
from transformers.testing_utils import get_tests_dir

@dataclass
class    __magic_name__						:
     A:		str



class    __magic_name__						(  unittest.TestCase):


     def   UpperCAmelCase__						(   self				:  Any      )	->   List[Any]:





      '''simple docstring'''






      UpperCamelCase__       :     Optional[Any] 							= get_tests_dir('''fixtures/test_sentencepiece.model'''      )
      UpperCamelCase__       :     Any 							= get_tests_dir('''fixtures/test_sentencepiece_with_bytefallback.model'''      )

      UpperCamelCase__       :     List[str] 							= FakeOriginalTokenizer(vocab_file=lowerCamelCase__      )

      with warnings.catch_warnings(record=lowerCamelCase__      ) as w:
       UpperCamelCase__       :     Optional[int] 							= SpmConverter(lowerCamelCase__      )
      self.assertEqual(len(lowerCamelCase__      )				,						0      )

      UpperCamelCase__       :     Tuple 							= FakeOriginalTokenizer(vocab_file=lowerCamelCase__      )

      with warnings.catch_warnings(record=lowerCamelCase__      ) as w:
       UpperCamelCase__       :     str 							= SpmConverter(lowerCamelCase__      )
      self.assertEqual(len(lowerCamelCase__      )				,						1      )

      self.assertIn(
          '''The sentencepiece tokenizer that you are converting to a fast tokenizer uses the byte fallback option'''
          ''' which is not implemented in the fast tokenizers.'''				,						str(w[0].message      )				,						)


