
def 							UpperCAmelCase_		(							__SCREAMING_SNAKE_CASE = 400_0000							):

	if n <= 1:
		return 0
	lowercase					  =   0
	lowercase					  =   2
	lowercase					  =   0
	while 4 * b + a <= n:
		lowercase  , lowercase					  =   b, 4 * b + a
		count += a
	return count + b


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



from __future__ import annotations

from queue import Queue







class 	A_       :




	'''simple docstring'''


	def __init__(	self	):
		lowercase					  =   {}





	def      SCREAMING_SNAKE_CASE__						(	self	):
		for i in self.vertices:
			print(snake_case		,   ' : '		,   ' -> '.join([str(snake_case	) for j in self.vertices[i]]	)	)





	def      SCREAMING_SNAKE_CASE__						(	self		,   snake_case		,   snake_case	):
		if from_vertex in self.vertices:
			self.vertices[from_vertex].append(snake_case	)
		else:
			lowercase					  =   [to_vertex]





	def      SCREAMING_SNAKE_CASE__						(	self		,   snake_case	):
		lowercase					  =   set()

		# create a first in first out queue to store all the vertices for BFS
		lowercase					  =   Queue()

		# mark the source node as visited and enqueue it
		visited.add(snake_case	)
		queue.put(snake_case	)

		while not queue.empty():
			lowercase					  =   queue.get()

			# loop through all adjacent vertex and enqueue it if not yet visited
			for adjacent_vertex in self.vertices[vertex]:
				if adjacent_vertex not in visited:
					queue.put(snake_case	)
					visited.add(snake_case	)
		return visited


if __name__ == "__main__":
	from doctest import testmod

	testmod(verbose=True)

	UpperCAmelCase     				=			Graph()
	g.add_edge(0, 1)
	g.add_edge(0, 2)
	g.add_edge(1, 2)
	g.add_edge(2, 0)
	g.add_edge(2, 3)
	g.add_edge(3, 3)

	g.print_graph()
	# 0  :  1 -> 2
	# 1  :  2
	# 2  :  0 -> 3
	# 3  :  3

	assert sorted(g.bfs(2)) == [0, 1, 2, 3]

