






"""simple docstring"""



from __future__ import annotations



def 						lowercase    (				__snake_case				: tuple[int, int]		,					__snake_case				: int	):
		lowercase_       ,					lowercase_ : int							       =   position
		lowercase_ : Optional[Any]							       =   [
		    (y + 1, x + 2),
		    (y - 1, x + 2),
		    (y + 1, x - 2),
		    (y - 1, x - 2),
		    (y + 2, x + 1),
		    (y + 2, x - 1),
		    (y - 2, x + 1),
		    (y - 2, x - 1),
		]
		lowercase_ : Union[str, Any]							       =   []

		for position in positions:
				lowercase_       ,					lowercase_ : Union[str, Any]							       =   position
				if 0 <= y_test < n and 0 <= x_test < n:
						permissible_positions.append(__snake_case	)

		return permissible_positions



def 						lowercase    (				__snake_case				: list[list[int]]	):
		return not any(elem == 0 for row in board for elem in row	)



def 						lowercase    (				__snake_case				: list[list[int]]		,					__snake_case				: tuple[int, int]		,					__snake_case				: int	):

		if is_complete(__snake_case	):
				return True

		for position in get_valid_pos(__snake_case		,					len(__snake_case	)	):
				lowercase_       ,					lowercase_ : str							       =   position

				if board[y][x] == 0:
						lowercase_ : Optional[Any]							       =   curr + 1
						if open_knight_tour_helper(__snake_case		,					__snake_case		,					curr + 1	):
								return True
						lowercase_ : Optional[int]							       =   0

		return False



def 						lowercase    (				__snake_case				: int	):
		lowercase_ : Optional[Any]							       =   [[0 for i in range(__snake_case	)] for j in range(__snake_case	)]

		for i in range(__snake_case	):
				for j in range(__snake_case	):
						lowercase_ : Dict							       =   1
						if open_knight_tour_helper(__snake_case		,					(i, j)		,					1	):
								return board
						lowercase_ : Optional[int]							       =   0

		lowercase_ : int							       =   F'''Open Kight Tour cannot be performed on a board of size {n}'''
		raise ValueError(__snake_case	)


if __name__ == "__main__":
						import doctest

						doctest.testmod()











"""simple docstring"""



def 						lowercase    (				__snake_case				: int	):
		if n == 1 or not isinstance(__snake_case		,					__snake_case	):
				return 0
		elif n == 2:
				return 1
		else:
				lowercase_ : Dict							       =   [0, 1]
				for i in range(2		,					n + 1	):
						sequence.append(sequence[i - 1] + sequence[i - 2]	)

				return sequence[n]



def 						lowercase    (				__snake_case				: int	):
		lowercase_ : str							       =   0
		lowercase_ : List[str]							       =   2

		while digits < n:
				index += 1
				lowercase_ : Any							       =   len(str(fibonacci(__snake_case	)	)	)

		return index



def 						lowercase    (				__snake_case				: int = 1_0_0_0	):
		return fibonacci_digits_index(__snake_case	)


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



