




import heapq as hq
import math
from collections.abc import Iterator

class 						__lowerCAmelCase      :
							def __init__(		self		:Optional[Any]						, __magic_name__		:Optional[int]							):







								'''simple docstring'''







								a									=				str(id_							)
								a									=				None
								a									=				None
								a									=				[]
								a									=				{}  # {vertex:distance}
							def __lt__(		self		:int						, __magic_name__		:Any							):







								'''simple docstring'''







								return self.key < other.key
							def __repr__(		self		:int							):







								'''simple docstring'''







								return self.id
							def  lowerCamelCase__				(		self		:int						, __magic_name__		:Dict							):







								'''simple docstring'''







								self.neighbors.append(__lowerCamelCase							)





							def  lowerCamelCase__				(		self		:List[Any]						, __magic_name__		:str						, __magic_name__		:str							):







								'''simple docstring'''







								a									=				weight







def 						__A						(      __lowerCamelCase				,     __lowerCamelCase				,     __lowerCamelCase				,     __lowerCamelCase       ) ->			Union[str, Any]:
	# add the neighbors:
	graph[a - 1].add_neighbor(graph[b - 1]       )
	graph[b - 1].add_neighbor(graph[a - 1]       )
	# add the edges:
	graph[a - 1].add_edge(graph[b - 1]				,     lowerCAmelCase_       )
	graph[b - 1].add_edge(graph[a - 1]				,     lowerCAmelCase_       )





def 						__A						(      __lowerCamelCase				,     __lowerCamelCase       ) ->			list:
	a									=				[]
	for u in graph:
		a									=				math.inf
		a									=				None
	a									=				0
	a									=				graph[:]
	while q:
		a									=				min(lowerCAmelCase_       )
		q.remove(lowerCAmelCase_       )
		for v in u.neighbors:
			if (v in q) and (u.edges[v.id] < v.key):
				a									=				u
				a									=				u.edges[v.id]
	for i in range(1				,     len(lowerCAmelCase_       )       ):
		a.append((int(graph[i].id       ) + 1, int(graph[i].pi.id       ) + 1)       )
	return a





def 						__A						(      __lowerCamelCase				,     __lowerCamelCase       ) ->			Iterator[tuple]:
	for u in graph:
		a									=				math.inf
		a									=				None
	a									=				0

	a									=				list(lowerCAmelCase_       )
	hq.heapify(lowerCAmelCase_       )

	while h:
		a									=				hq.heappop(lowerCAmelCase_       )
		for v in u.neighbors:
			if (v in h) and (u.edges[v.id] < v.key):
				a									=				u
				a									=				u.edges[v.id]
				hq.heapify(lowerCAmelCase_       )

	for i in range(1				,     len(lowerCAmelCase_       )       ):
		yield (int(graph[i].id       ) + 1, int(graph[i].pi.id       ) + 1)





def 						__A						(      ) ->			None:
	pass


if __name__ == "__main__":
		import doctest

		doctest.testmod()





def 	_UpperCamelCase					(    lowerCAmelCase_ )    ->int:
   if n == 1 or not isinstance(lowerCAmelCase_	,    lowerCAmelCase_ ):
      return 0
   elif n == 2:
      return 1
   else:
      UpperCAmelCase      					=  [0, 1]
      for i in range(2	,    n + 1 ):
         sequence.append(sequence[i - 1] + sequence[i - 2] )

      return sequence[n]
def 	_UpperCamelCase					(    lowerCAmelCase_ )    ->int:
   UpperCAmelCase      					=  0
   UpperCAmelCase      					=  2

   while digits < n:
      index += 1
      UpperCAmelCase      					=  len(str(fibonacci(lowerCAmelCase_ ) ) )

   return index
def 	_UpperCamelCase					(    lowerCAmelCase_ = 1_0_0_0 )    ->int:
   return fibonacci_digits_index(lowerCAmelCase_ )


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



