import os

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




def 						SCREAMING_SNAKE_CASE					(  )							->   List[Any]:
				SCREAMING_SNAKE_CASE__		  =				os.path.dirname(os.path.realpath(__UpperCAmelCase       )       )
				SCREAMING_SNAKE_CASE__		  =				os.path.join(__UpperCAmelCase  ,					"words.txt"       )

				SCREAMING_SNAKE_CASE__		  =				""
				with open(__UpperCAmelCase       ) as f:
								SCREAMING_SNAKE_CASE__		  =				f.readline()

				SCREAMING_SNAKE_CASE__		  =				[word.strip("\""       ) for word in words.strip("\r\n"       ).split(","       )]
				SCREAMING_SNAKE_CASE__		  =				[
				    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())





"""simple docstring"""






import sys




def 						SCREAMING_SNAKE_CASE					(  __UpperCAmelCase       )							->   Any:
				SCREAMING_SNAKE_CASE__		  =				len(__UpperCAmelCase       )
				SCREAMING_SNAKE_CASE__		  =				[[0 for x in range(__UpperCAmelCase       )] for x in range(__UpperCAmelCase       )]
				SCREAMING_SNAKE_CASE__		  =				[[0 for x in range(__UpperCAmelCase       )] for x in range(__UpperCAmelCase       )]

				for chain_length in range(2  ,					__UpperCAmelCase       ):
								for a in range(1  ,					n - chain_length + 1       ):
												SCREAMING_SNAKE_CASE__		  =				a + chain_length - 1

												SCREAMING_SNAKE_CASE__		  =				sys.maxsize
												for c in range(__UpperCAmelCase  ,					__UpperCAmelCase       ):
																SCREAMING_SNAKE_CASE__		  =				(
																    matrix[a][c] + matrix[c + 1][b] + array[a - 1] * array[c] * array[b]
																)
																if cost < matrix[a][b]:
																				SCREAMING_SNAKE_CASE__		  =				cost
																				SCREAMING_SNAKE_CASE__		  =				c
				return matrix, sol




def 						SCREAMING_SNAKE_CASE					(  __UpperCAmelCase  ,					__UpperCAmelCase  ,					__UpperCAmelCase       )							->   Union[str, Any]:
				if i == j:
								print("A" + str(__UpperCAmelCase       )  ,					end=" "       )
				else:
								print("("  ,					end=" "       )
								print_optiomal_solution(__UpperCAmelCase  ,					__UpperCAmelCase  ,					optimal_solution[i][j]       )
								print_optiomal_solution(__UpperCAmelCase  ,					optimal_solution[i][j] + 1  ,					__UpperCAmelCase       )
								print(")"  ,					end=" "       )




def 						SCREAMING_SNAKE_CASE					(  )							->   Any:
				SCREAMING_SNAKE_CASE__		  =				[30, 35, 15, 5, 10, 20, 25]
				SCREAMING_SNAKE_CASE__		  =				len(__UpperCAmelCase       )
				# Size of matrix created from above array will be
				# 30*35 35*15 15*5 5*10 10*20 20*25
				SCREAMING_SNAKE_CASE__  ,       SCREAMING_SNAKE_CASE__		  =				matrix_chain_order(__UpperCAmelCase       )

				print("No. of Operation required: " + str(matrix[1][n - 1]       )       )
				print_optiomal_solution(__UpperCAmelCase  ,					1  ,					n - 1       )


if __name__ == "__main__":
						main()




