"""simple docstring"""


import math


def   __UpperCAmelCase     (	_snake_case		:       int       ):
   return sum(int(_snake_case       ) for digit in str(_snake_case       )       )


def   __UpperCAmelCase     (	_snake_case		:       int = 3_0       ):
   _lowercase							     =       []
   for digit in range(2,				1_0_0       ):
      for power in range(2,				1_0_0       ):
         _lowercase							     =       int(math.pow(_snake_case,				_snake_case       )       )
         if digit == digit_sum(_snake_case       ):
            digit_to_powers.append(_snake_case       )

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


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


__UpperCamelCase       :    List[Any]         =		"\n# Diffusers installation\n! pip install diffusers transformers datasets accelerate\n# To install from source instead of the last release, comment the command above and uncomment the following one.\n# ! pip install git+https://github.com/huggingface/diffusers.git\n"

__UpperCamelCase       :    Any         =		[{"type": "code", "content": INSTALL_CONTENT}]