
'''simple docstring'''







class 						__UpperCAmelCase      (					_lowerCamelCase						):
							pass


class 						__UpperCAmelCase      (					_lowerCamelCase						):
							pass


class 						__UpperCAmelCase      :


							def __init__(       self  ):





								"""simple docstring"""






								_snake_case   						=		[
								    [],
								    [],
								    [],
								]


							def  lowerCamelCase				(       self    ,   lowerCAmelCase_    ,   lowerCAmelCase_  ):





								"""simple docstring"""






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


							def  lowerCamelCase				(       self  ):





								"""simple docstring"""






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




							def __str__(       self  ):





								"""simple docstring"""






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


class 						__UpperCAmelCase      :


							def __init__(       self  ):





								"""simple docstring"""






								_snake_case   						=		[]


							def  lowerCamelCase				(       self    ,   lowerCAmelCase_  ):





								"""simple docstring"""






								if len(self.queue  ) == 1_00:
									raise OverFlowError('Maximum queue size is 100'  )
								self.queue.append(lowerCAmelCase_  )


							def  lowerCamelCase				(       self  ):





								"""simple docstring"""






								if not self.queue:
									raise UnderFlowError('The queue is empty'  )
								else:
									_snake_case   						=		min(self.queue  )
									self.queue.remove(lowerCAmelCase_  )
									return data




							def __str__(       self  ):





								"""simple docstring"""






								return str(self.queue  )







def 				SCREAMING_SNAKE_CASE__	(   )       ->	Tuple:
	_snake_case   						=		FixedPriorityQueue()
	fpq.enqueue(0			,				10	)
	fpq.enqueue(1			,				70	)
	fpq.enqueue(0			,				100	)
	fpq.enqueue(2			,				1	)
	fpq.enqueue(2			,				5	)
	fpq.enqueue(1			,				7	)
	fpq.enqueue(2			,				4	)
	fpq.enqueue(1			,				64	)
	fpq.enqueue(0			,				128	)
	print(__A	)
	print(fpq.dequeue()	)
	print(fpq.dequeue()	)
	print(fpq.dequeue()	)
	print(fpq.dequeue()	)
	print(fpq.dequeue()	)
	print(__A	)
	print(fpq.dequeue()	)
	print(fpq.dequeue()	)
	print(fpq.dequeue()	)
	print(fpq.dequeue()	)
	print(fpq.dequeue()	)







def 				SCREAMING_SNAKE_CASE__	(   )       ->	str:
	_snake_case   						=		ElementPriorityQueue()
	epq.enqueue(10	)
	epq.enqueue(70	)
	epq.enqueue(100	)
	epq.enqueue(1	)
	epq.enqueue(5	)
	epq.enqueue(7	)
	epq.enqueue(4	)
	epq.enqueue(64	)
	epq.enqueue(128	)
	print(__A	)
	print(epq.dequeue()	)
	print(epq.dequeue()	)
	print(epq.dequeue()	)
	print(epq.dequeue()	)
	print(epq.dequeue()	)
	print(__A	)
	print(epq.dequeue()	)
	print(epq.dequeue()	)
	print(epq.dequeue()	)
	print(epq.dequeue()	)
	print(epq.dequeue()	)


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



'''simple docstring'''







from collections import defaultdict
from math import gcd







def 				SCREAMING_SNAKE_CASE__	(   __A = 1_500_000	)       ->	int:
	_snake_case   						=		defaultdict(__A	)
	_snake_case   						=		2
	while 2 * euclid_m * (euclid_m + 1) <= limit:
		for euclid_n in range((euclid_m % 2) + 1			,				__A			,				2	):
			if gcd(__A			,				__A	) > 1:
				continue
			_snake_case   						=		2 * euclid_m * (euclid_m + euclid_n)
			for perimeter in range(__A			,				limit + 1			,				__A	):
				frequencies[perimeter] += 1
		euclid_m += 1
	return sum(1 for frequency in frequencies.values() if frequency == 1	)


if __name__ == "__main__":
					print(F'''{solution() = }''')

