"""simple docstring"""




import math

class    a_   :




					def __init__(						self    :  int	,    snake_case__    :  List[str]=0  ):  # a graph with Node 0,1,...,N-1
							lowerCAmelCase__   = n
							lowerCAmelCase__   = [
							    [math.inf for j in range(0	,    snake_case__  )] for i in range(0	,    snake_case__  )
							]  # adjacency matrix for weight
							lowerCAmelCase__   = [
							    [math.inf for j in range(0	,    snake_case__  )] for i in range(0	,    snake_case__  )
							]  # dp[i][j] stores minimum distance from i to j




					def     _SCREAMING_SNAKE_CASE    (						self    :  Any	,    snake_case__    :  List[str]	,    snake_case__    :  int	,    snake_case__    :  Any  ):
							lowerCAmelCase__   = w




					def     _SCREAMING_SNAKE_CASE    (						self    :  Optional[int]  ):
							for k in range(0	,    self.n  ):
									for i in range(0	,    self.n  ):
											for j in range(0	,    self.n  ):
													lowerCAmelCase__   = min(self.dp[i][j]	,    self.dp[i][k] + self.dp[k][j]  )




					def     _SCREAMING_SNAKE_CASE    (						self    :  Dict	,    snake_case__    :  Tuple	,    snake_case__    :  List[str]  ):
							return self.dp[u][v]


if __name__ == "__main__":
			__lowerCAmelCase     :				str    				=    Graph(5)
			graph.add_edge(0, 2, 9)
			graph.add_edge(0, 4, 10)
			graph.add_edge(1, 3, 5)
			graph.add_edge(2, 3, 7)
			graph.add_edge(3, 0, 10)
			graph.add_edge(3, 1, 2)
			graph.add_edge(3, 2, 1)
			graph.add_edge(3, 4, 6)
			graph.add_edge(4, 1, 3)
			graph.add_edge(4, 2, 4)
			graph.add_edge(4, 3, 9)
			graph.floyd_warshall()
			graph.show_min(1, 4)
			graph.show_min(0, 3)





"""simple docstring"""




from collections.abc import Generator







def 				_UpperCAmelCase		(							):





		"""simple docstring"""




		lowerCAmelCase__ ,       lowerCAmelCase__   = 0, 1
		while True:
				lowerCAmelCase__ ,       lowerCAmelCase__   = b, a + b
				yield b







def 				_UpperCAmelCase		(							lowerCamelCase__ = 1000  ):





		"""simple docstring"""




		lowerCAmelCase__   = 1
		lowerCAmelCase__   = fibonacci_generator()
		while len(str(next(lowerCamelCase__  )  )  ) < n:
				answer += 1
		return answer + 1


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




