



class 			__magic_name__ :






		def __init__(    self   :  Dict					,		UpperCamelCase__   :  Dict					,		UpperCamelCase__   :  List[str]=None					,		UpperCamelCase__   :  Optional[Any]=None   )					->       str:
								'''simple docstring'''







								UpperCAmelCase								=  data
								UpperCAmelCase								=  previous
								UpperCAmelCase								=  next_node






		def __str__(    self   :  Tuple   )					->       str:
								'''simple docstring'''







								return F'{self.data}'






		def SCREAMING_SNAKE_CASE_      (    self   :  Optional[Any]   )					->       int:
								'''simple docstring'''







								return self.data






		def SCREAMING_SNAKE_CASE_      (    self   :  str   )					->       int:
								'''simple docstring'''







								return self.next







		def SCREAMING_SNAKE_CASE_      (    self   :  Dict   )					->       Tuple:
								'''simple docstring'''







								return self.previous





class 			__magic_name__ :






		def __init__(    self   :  Optional[Any]					,		UpperCamelCase__   :  Any   )					->       Optional[int]:
								'''simple docstring'''







								UpperCAmelCase								=  head






		def __iter__(    self   :  Union[str, Any]   )					->       int:
								'''simple docstring'''







								return self







		def SCREAMING_SNAKE_CASE_      (    self   :  Optional[Any]   )					->       List[str]:
								'''simple docstring'''







								if not self.current:
														raise StopIteration
								else:
														UpperCAmelCase								=  self.current.get_data()
														UpperCAmelCase								=  self.current.get_next()
														return value





class 			__magic_name__ :






		def __init__(    self   :  Tuple   )					->       List[str]:
								'''simple docstring'''







								UpperCAmelCase								=  None  # First node in list
								UpperCAmelCase								=  None  # Last node in list






		def __str__(    self   :  Optional[Any]   )					->       List[Any]:
								'''simple docstring'''







								UpperCAmelCase								=  self.head
								UpperCAmelCase								=  []
								while current is not None:
														nodes.append(current.get_data()   )
														UpperCAmelCase								=  current.get_next()
								return " ".join(str(SCREAMING_SNAKE_CASE_   ) for node in nodes   )






		def __contains__(    self   :  int					,		UpperCamelCase__   :  int   )					->       Tuple:
								'''simple docstring'''







								UpperCAmelCase								=  self.head
								while current:
														if current.get_data() == value:
																				return True
														UpperCAmelCase								=  current.get_next()
								return False






		def __iter__(    self   :  Union[str, Any]   )					->       int:
								'''simple docstring'''







								return LinkedListIterator(self.head   )






		def SCREAMING_SNAKE_CASE_      (    self   :  Optional[int]   )					->       List[str]:
								'''simple docstring'''







								if self.head:
														return self.head.get_data()
								return None






		def SCREAMING_SNAKE_CASE_      (    self   :  Union[str, Any]   )					->       Any:
								'''simple docstring'''







								if self.tail:
														return self.tail.get_data()
								return None






		def SCREAMING_SNAKE_CASE_      (    self   :  List[str]					,		UpperCamelCase__   :  int   )					->       None:
								'''simple docstring'''







								if self.head is None:
														UpperCAmelCase								=  node
														UpperCAmelCase								=  node
								else:
														self.insert_before_node(self.head					,		SCREAMING_SNAKE_CASE_   )






		def SCREAMING_SNAKE_CASE_      (    self   :  List[Any]					,		UpperCamelCase__   :  Optional[Any]   )					->       None:
								'''simple docstring'''







								if self.head is None:
														self.set_head(SCREAMING_SNAKE_CASE_   )
								else:
														self.insert_after_node(self.tail					,		SCREAMING_SNAKE_CASE_   )






		def SCREAMING_SNAKE_CASE_      (    self   :  Dict					,		UpperCamelCase__   :  Union[str, Any]   )					->       None:
								'''simple docstring'''







								UpperCAmelCase								=  Node(SCREAMING_SNAKE_CASE_   )
								if self.head is None:
														self.set_head(SCREAMING_SNAKE_CASE_   )
								else:
														self.set_tail(SCREAMING_SNAKE_CASE_   )






		def SCREAMING_SNAKE_CASE_      (    self   :  Optional[Any]					,		UpperCamelCase__   :  Any					,		UpperCamelCase__   :  Union[str, Any]   )					->       None:
								'''simple docstring'''







								UpperCAmelCase								=  node
								UpperCAmelCase								=  node.previous

								if node.get_previous() is None:
														UpperCAmelCase								=  node_to_insert
								else:
														UpperCAmelCase								=  node_to_insert

								UpperCAmelCase								=  node_to_insert






		def SCREAMING_SNAKE_CASE_      (    self   :  Union[str, Any]					,		UpperCamelCase__   :  List[Any]					,		UpperCamelCase__   :  Dict   )					->       None:
								'''simple docstring'''







								UpperCAmelCase								=  node
								UpperCAmelCase								=  node.next

								if node.get_next() is None:
														UpperCAmelCase								=  node_to_insert
								else:
														UpperCAmelCase								=  node_to_insert

								UpperCAmelCase								=  node_to_insert






		def SCREAMING_SNAKE_CASE_      (    self   :  Any					,		UpperCamelCase__   :  List[Any]					,		UpperCamelCase__   :  List[Any]   )					->       None:
								'''simple docstring'''







								UpperCAmelCase								=  1
								UpperCAmelCase								=  Node(SCREAMING_SNAKE_CASE_   )
								UpperCAmelCase								=  self.head
								while node:
														if current_position == position:
																				self.insert_before_node(SCREAMING_SNAKE_CASE_					,		SCREAMING_SNAKE_CASE_   )
																				return
														current_position += 1
														UpperCAmelCase								=  node.next
								self.insert_after_node(self.tail					,		SCREAMING_SNAKE_CASE_   )






		def SCREAMING_SNAKE_CASE_      (    self   :  str					,		UpperCamelCase__   :  List[Any]   )					->       Node:
								'''simple docstring'''







								UpperCAmelCase								=  self.head
								while node:
														if node.get_data() == item:
																				return node
														UpperCAmelCase								=  node.get_next()
								raise Exception("Node not found"   )






		def SCREAMING_SNAKE_CASE_      (    self   :  Any					,		UpperCamelCase__   :  Optional[int]   )					->       Tuple:
								'''simple docstring'''







								if (node := self.get_node(SCREAMING_SNAKE_CASE_   )) is not None:
														if node == self.head:
																				UpperCAmelCase								=  self.head.get_next()

														if node == self.tail:
																				UpperCAmelCase								=  self.tail.get_previous()

														self.remove_node_pointers(SCREAMING_SNAKE_CASE_   )






		@staticmethod
		def SCREAMING_SNAKE_CASE_      (    UpperCamelCase__   :  str   )					->       None:
								'''simple docstring'''







								if node.get_next():
														UpperCAmelCase								=  node.previous

								if node.get_previous():
														UpperCAmelCase								=  node.next

								UpperCAmelCase								=  None
								UpperCAmelCase								=  None







		def SCREAMING_SNAKE_CASE_      (    self   :  Optional[int]   )					->       str:
								'''simple docstring'''







								return self.head is None

def  lowerCamelCase_()			->							int:
						pass




if __name__ == "__main__":
		import doctest

		doctest.testmod()








def  lowerCAmelCase_	(lowerCAmelCase__:		int  ):





			"""simple docstring"""


			if n == 1 or not isinstance(lowerCAmelCase__		,						lowerCAmelCase__  ):
						return 0
			elif n == 2:
						return 1
			else:
						UpperCAmelCase_:		Optional[int]							      =     [0, 1]
						for i in range(2		,						n + 1  ):
									sequence.append(sequence[i - 1] + sequence[i - 2]  )

						return sequence[n]







def  lowerCAmelCase_	(lowerCAmelCase__:		int  ):





			"""simple docstring"""


			UpperCAmelCase_:		str							      =     0
			UpperCAmelCase_:		str							      =     2

			while digits < n:
						index += 1
						UpperCAmelCase_:		Union[str, Any]							      =     len(str(fibonacci(lowerCAmelCase__  )  )  )

			return index







def  lowerCAmelCase_	(lowerCAmelCase__:		int = 1_0_0_0  ):





			"""simple docstring"""


			return fibonacci_digits_index(lowerCAmelCase__  )


if __name__ == "__main__":
	print(solution(int(str(input()).strip())))






