

import math
import sys







def       A_				(   _UpperCAmelCase   ):
						if number != int(_UpperCAmelCase   ):
												raise ValueError("the value of input must be a natural number"   )
						if number < 0:
												raise ValueError("the value of input must not be a negative number"   )
						if number == 0:
												return 1
						SCREAMING_SNAKE_CASE_:			Dict  		=	[-1] * (number + 1)
						SCREAMING_SNAKE_CASE_:			Dict  		=	0
						for i in range(1    ,     number + 1   ):
												SCREAMING_SNAKE_CASE_:			int  		=	sys.maxsize
												SCREAMING_SNAKE_CASE_:			Any  		=	int(math.sqrt(_UpperCAmelCase   )   )
												for j in range(1    ,     root + 1   ):
																		SCREAMING_SNAKE_CASE_:			Any  		=	1 + answers[i - (j**2)]
																		SCREAMING_SNAKE_CASE_:			List[str]  		=	min(_UpperCAmelCase    ,     _UpperCAmelCase   )
												SCREAMING_SNAKE_CASE_:			Union[str, Any]  		=	answer
						return answers[number]


if __name__ == "__main__":
						import doctest

						doctest.testmod()








import os

# Precomputes a list of the 100 first triangular numbers
lowerCAmelCase							:  Optional[int]            =						[int(0.5 * n * (n + 1)) for n in range(1, 101)]







def       A_				(   ):
						SCREAMING_SNAKE_CASE_:			List[str]  		=	os.path.dirname(os.path.realpath(_UpperCAmelCase   )   )
						SCREAMING_SNAKE_CASE_:			Union[str, Any]  		=	os.path.join(_UpperCAmelCase    ,     "words.txt"   )

						SCREAMING_SNAKE_CASE_:			Dict  		=	""
						with open(_UpperCAmelCase   ) as f:
												SCREAMING_SNAKE_CASE_:			int  		=	f.readline()

						SCREAMING_SNAKE_CASE_:			Optional[int]  		=	[word.strip("\""   ) for word in words.strip("\r\n"   ).split(","   )]
						SCREAMING_SNAKE_CASE_:			List[Any]  		=	[
						    word
						    for word in [sum(ord(_UpperCAmelCase   ) - 64 for x in word   ) for word in words]
						    if word in TRIANGULAR_NUMBERS
						]
						return len(_UpperCAmelCase   )


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






