




def 	A ( _SCREAMING_SNAKE_CASE = 10					,_SCREAMING_SNAKE_CASE = 22       )      ->					int:
       lowerCamelCase  : Union[str, Any]     					=   range(1					,UpperCAmelCase_       )
       lowerCamelCase  : List[Any]     					=   range(1					,UpperCAmelCase_       )
       return sum(
           1 for power in powers for base in bases if len(str(base**power       )       ) == power       )


if __name__ == "__main__":
       print(f'''{solution(10, 22) = }''')











"""simple docstring"""







def       _lowerCamelCase				(							UpperCAmelCase_ :       Optional[Any]     )	-> Dict:






	"""simple docstring"""





	A__											=					[]
	A__											=					set({"(", "[", "{"}     )
	A__											=					set({")", "]", "}"}     )
	A__											=					{"{": "}", "[": "]", "(": ")"}

	for i in range(len(UpperCAmelCase_     )     ):
		if s[i] in open_brackets:
			stack.append(s[i]     )

		elif s[i] in closed_brackets and (
		    len(UpperCAmelCase_     ) == 0 or (len(UpperCAmelCase_     ) > 0 and open_to_closed[stack.pop()] != s[i])
		):
			return False

	return len(UpperCAmelCase_     ) == 0

def       _lowerCamelCase				(							)	-> str:






	"""simple docstring"""





	A__											=					input("Enter sequence of brackets: "     )
	if is_balanced(UpperCAmelCase_     ):
		print(UpperCAmelCase_,	"is balanced"     )
	else:
		print(UpperCAmelCase_,	"is not balanced"     )


if __name__ == "__main__":
			main()




