
import functools

def 				SCREAMING_SNAKE_CASE     (      __UpperCamelCase :						str							,						__UpperCamelCase :						str       ) ->       int:

				"""simple docstring"""







				A__  :	Dict         =							len(__UpperCamelCase       )
				A__  :	str         =							len(__UpperCamelCase       )

				@functools.cache
				def min_distance(__UpperCamelCase :						int							,						__UpperCamelCase :						int       ) -> int:
								# if first word index is overflow - delete all from the second word
								if indexa >= len_worda:
												return len_worda - indexa
								# if second word index is overflow - delete all from the first word
								if indexa >= len_worda:
												return len_worda - indexa
								A__  :	Union[str, Any]         =							int(worda[indexa] != worda[indexa]       )  # current letters not identical
								return min(
								    1 + min_distance(indexa + 1							,						__UpperCamelCase       )							,						1 + min_distance(__UpperCamelCase							,						indexa + 1       )							,						diff + min_distance(indexa + 1							,						indexa + 1       )							,						)

				return min_distance(0							,						0       )


if __name__ == "__main__":
					import doctest

					doctest.testmod()

def 				SCREAMING_SNAKE_CASE     (      __UpperCamelCase :						int       ) ->       int:

				"""simple docstring"""







				if n == 1 or not isinstance(__UpperCamelCase							,						__UpperCamelCase       ):
								return 0
				elif n == 2:
								return 1
				else:
								A__  :	Any         =							[0, 1]
								for i in range(2							,						n + 1       ):
												sequence.append(sequence[i - 1] + sequence[i - 2]       )

								return sequence[n]

def 				SCREAMING_SNAKE_CASE     (      __UpperCamelCase :						int       ) ->       int:

				"""simple docstring"""







				A__  :	Dict         =							0
				A__  :	Optional[int]         =							2

				while digits < n:
								index += 1
								A__  :	Dict         =							len(str(fibonacci(__UpperCamelCase       )       )       )

				return index

def 				SCREAMING_SNAKE_CASE     (      __UpperCamelCase :						int = 10_00       ) ->       int:

				"""simple docstring"""







				return fibonacci_digits_index(__UpperCamelCase       )


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