

def 					lowerCamelCase_     (   UpperCAmelCase_							:     int = 1_0_0	)						->				int:




	'''simple docstring'''




	_UpperCamelCase   :		List[Any]			=						set()

	_UpperCamelCase   :		Union[str, Any]			=						0

	_UpperCamelCase   :		int			=						n + 1  # maximum limit

	for a in range(2							,       __UpperCamelCase	):
		for b in range(2							,       __UpperCamelCase	):
			_UpperCamelCase   :		Dict			=						a**b  # calculates the current power
			collect_powers.add(__UpperCamelCase	)  # adds the result to the set
	return len(__UpperCamelCase	)


if __name__ == "__main__":
							print("""Number of terms """, solution(int(str(input()).strip())))







import functools






def 					lowerCamelCase_     (							UpperCAmelCase_							:     list[int]							,       UpperCAmelCase_							:     list[int]	)						->				int:




	'''simple docstring'''




	if not isinstance(UpperCAmelCase_							,       UpperCAmelCase_	) or not all(isinstance(UpperCAmelCase_							,       UpperCAmelCase_	) for day in days	):
		raise ValueError('The parameter days should be a list of integers'	)

	if len(UpperCAmelCase_	) != 3 or not all(isinstance(UpperCAmelCase_							,       UpperCAmelCase_	) for cost in costs	):
		raise ValueError('The parameter costs should be a list of three integers'	)

	if len(UpperCAmelCase_	) == 0:
		return 0

	if min(UpperCAmelCase_	) <= 0:
		raise ValueError('All days elements should be greater than 0'	)

	if max(UpperCAmelCase_	) >= 3_6_6:
		raise ValueError('All days elements should be less than 366'	)

	_UpperCamelCase   :		Union[str, Any]			=						set(UpperCAmelCase_	)

	@functools.cache
	def dynamic_programming(UpperCAmelCase_							:     int	) -> int:
		if index > 3_6_5:
			return 0

		if index not in days_set:
			return dynamic_programming(index + 1	)

		return min(
		    costs[0] + dynamic_programming(index + 1	)							,       costs[1] + dynamic_programming(index + 7	)							,       costs[2] + dynamic_programming(index + 3_0	)							,       )

	return dynamic_programming(1	)


if __name__ == "__main__":
							import doctest

							doctest.testmod()




