



"""simple docstring"""





class  _lowerCAmelCase     (					SCREAMING_SNAKE_CASE__		):





		"""simple docstring"""






		pass




class  _lowerCAmelCase     (					SCREAMING_SNAKE_CASE__		):





		"""simple docstring"""






		pass




class  _lowerCAmelCase     :





		"""simple docstring"""






		def __init__(       self )			->    List[str]:







								'''simple docstring'''

								snake_case_ :			Dict            =      [
								    [],
								    [],
								    [],
								]





		def  UpperCAmelCase__				(       self				,     _lowercase				,     _lowercase )			->    None:







								'''simple docstring'''

								try:
														if len(self.queues[priority] ) >= 1_0_0:
																				raise OverflowError("""Maximum queue size is 100""" )
														self.queues[priority].append(_lowercase )
								except IndexError:
														raise ValueError("""Valid priorities are 0, 1, and 2""" )





		def  UpperCAmelCase__				(       self )			->    int:







								'''simple docstring'''

								for queue in self.queues:
														if queue:
																				return queue.pop(0 )
								raise UnderFlowError("""All queues are empty""" )





		def __str__(       self )			->    str:







								'''simple docstring'''

								return "\n".join(f'Priority {i}: {q}' for i, q in enumerate(self.queues ) )




class  _lowerCAmelCase     :





		"""simple docstring"""






		def __init__(       self )			->    Optional[int]:







								'''simple docstring'''

								snake_case_ :			Optional[int]            =      []





		def  UpperCAmelCase__				(       self				,     _lowercase )			->    None:







								'''simple docstring'''

								if len(self.queue ) == 1_0_0:
														raise OverFlowError("""Maximum queue size is 100""" )
								self.queue.append(_lowercase )





		def  UpperCAmelCase__				(       self )			->    int:







								'''simple docstring'''

								if not self.queue:
														raise UnderFlowError("""The queue is empty""" )
								else:
														snake_case_ :			Any            =      min(self.queue )
														self.queue.remove(_lowercase )
														return data





		def __str__(       self )			->    str:







								'''simple docstring'''

								return str(self.queue )




def 						__lowerCAmelCase    (		):


						'''simple docstring'''






						snake_case_ :			Dict            =      FixedPriorityQueue()
						fpq.enqueue(0       ,			1_0     )
						fpq.enqueue(1       ,			7_0     )
						fpq.enqueue(0       ,			1_0_0     )
						fpq.enqueue(2       ,			1     )
						fpq.enqueue(2       ,			5     )
						fpq.enqueue(1       ,			7     )
						fpq.enqueue(2       ,			4     )
						fpq.enqueue(1       ,			6_4     )
						fpq.enqueue(0       ,			1_2_8     )
						print(__UpperCamelCase     )
						print(fpq.dequeue()     )
						print(fpq.dequeue()     )
						print(fpq.dequeue()     )
						print(fpq.dequeue()     )
						print(fpq.dequeue()     )
						print(__UpperCamelCase     )
						print(fpq.dequeue()     )
						print(fpq.dequeue()     )
						print(fpq.dequeue()     )
						print(fpq.dequeue()     )
						print(fpq.dequeue()     )
def 						__lowerCAmelCase    (		):


						'''simple docstring'''






						snake_case_ :			Optional[Any]            =      ElementPriorityQueue()
						epq.enqueue(1_0     )
						epq.enqueue(7_0     )
						epq.enqueue(1_0_0     )
						epq.enqueue(1     )
						epq.enqueue(5     )
						epq.enqueue(7     )
						epq.enqueue(4     )
						epq.enqueue(6_4     )
						epq.enqueue(1_2_8     )
						print(__UpperCamelCase     )
						print(epq.dequeue()     )
						print(epq.dequeue()     )
						print(epq.dequeue()     )
						print(epq.dequeue()     )
						print(epq.dequeue()     )
						print(__UpperCamelCase     )
						print(epq.dequeue()     )
						print(epq.dequeue()     )
						print(epq.dequeue()     )
						print(epq.dequeue()     )
						print(epq.dequeue()     )


if __name__ == "__main__":
					fixed_priority_queue()
					element_priority_queue()



import os

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




def 	UpperCamelCase__  (     )  ->     str:
						_lowercase					       =					os.path.dirname(os.path.realpath(SCREAMING_SNAKE_CASE_       )       )
						_lowercase					       =					os.path.join(SCREAMING_SNAKE_CASE_		,   """words.txt"""       )

						_lowercase					       =					""""""
						with open(SCREAMING_SNAKE_CASE_       ) as f:
												_lowercase					       =					f.readline()

						_lowercase					       =					[word.strip("""\""""       ) for word in words.strip("""\r\n"""       ).split(""","""       )]
						_lowercase					       =					[
						    word
						    for word in [sum(ord(SCREAMING_SNAKE_CASE_       ) - 64 for x in word       ) for word in words]
						    if word in TRIANGULAR_NUMBERS
						]
						return len(SCREAMING_SNAKE_CASE_       )


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