




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

		return sequence[n]





def 						__A						(      __lowerCamelCase       ) ->			int:
	a									=				0
	a									=				2

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

	return index





def 						__A						(      __lowerCamelCase = 1000       ) ->			int:
	return fibonacci_digits_index(lowerCAmelCase_       )


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





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())))



