






"""simple docstring"""







import math





def 							SCREAMING_SNAKE_CASE							(   lowerCamelCase_):
					return sum(int(lowerCamelCase_) for digit in str(lowerCamelCase_))





def 							SCREAMING_SNAKE_CASE							(   lowerCamelCase_ = 30):
					a__ 							=	[]
					for digit in range(2			,  100):
										for power in range(2			,  100):
															a__ 							=	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())










"""simple docstring"""







from itertools import combinations, product





def 							SCREAMING_SNAKE_CASE							(   lowerCamelCase_			,  lowerCamelCase_			,  lowerCamelCase_			,  lowerCamelCase_):
					if xa == ya == 0 or xa == ya == 0:
										return False
					a__ 							=	xa * xa + ya * ya
					a__ 							=	xa * xa + ya * ya
					a__ 							=	(xa - xa) * (xa - xa) + (ya - ya) * (ya - ya)
					return (
					    a_square + b_square == c_square
					    or a_square + c_square == b_square
					    or b_square + c_square == a_square
					)





def 							SCREAMING_SNAKE_CASE							(   lowerCamelCase_ = 50):
					return sum(
					    1
					    for pta, pta in combinations(product(range(limit + 1)			,  repeat=2)			,  2)
					    if is_right(*lowerCamelCase_			,  *lowerCamelCase_))


if __name__ == "__main__":
	print(F'''{solution() = }''')


