


"""simple docstring"""
import math






def 						lowercase				(	_snake_case		: int	)	->int:
	"""simple docstring"""





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






def 						lowercase				(	_snake_case		: int = 30	)	->int:
	"""simple docstring"""





	__snake_case      :		Optional[Any]         =							[]
	for digit in range(2	,  100	):
		for power in range(2	,  100	):
			__snake_case      :		Dict         =							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"""
import math







def     _a					(   _SCREAMING_SNAKE_CASE					)     ->					list[int]:
							if not isinstance(_SCREAMING_SNAKE_CASE					,			_SCREAMING_SNAKE_CASE					):
														snake_case_     							=		f"""Input value of [number={number}] must be an integer"""
														raise TypeError(_SCREAMING_SNAKE_CASE					)
							if number < 1:
														snake_case_     							=		f"""Input value of [number={number}] must be a positive integer"""
														raise ValueError(_SCREAMING_SNAKE_CASE					)
							snake_case_     							=		[number]
							while number != 1:
														if number % 2 == 0:
																					snake_case_     							=		math.floor(math.sqrt(_SCREAMING_SNAKE_CASE					)					)
														else:
																					snake_case_     							=		math.floor(
																					    math.sqrt(_SCREAMING_SNAKE_CASE					) * math.sqrt(_SCREAMING_SNAKE_CASE					) * math.sqrt(_SCREAMING_SNAKE_CASE					)					)
														sequence.append(_SCREAMING_SNAKE_CASE					)
							return sequence


if __name__ == "__main__":
				import doctest

				doctest.testmod()



