

'''simple docstring'''


import numpy as np
from cva import COLOR_BGR2GRAY, CV_8UC3, cvtColor, filteraD, imread, imshow, waitKey




def 	_a       (				__lowerCAmelCase		:      int   ,							__lowerCAmelCase		:      int   ,							__lowerCAmelCase		:      int   ,							__lowerCAmelCase		:      int   ,							__lowerCAmelCase		:      int   ,							__lowerCAmelCase		:      int     ):

		"""simple docstring"""

		if (ksize % 2) == 0:
				snake_case__						:       str       						=  ksize + 1
		snake_case__						:       Any       						=  np.zeros((ksize, ksize)   ,							dtype=np.floataa     )

		# each value
		for y in range(__lowerCAmelCase     ):
				for x in range(__lowerCAmelCase     ):
						# distance from center
						snake_case__						:       Optional[int]       						=  x - ksize // 2
						snake_case__						:       List[Any]       						=  y - ksize // 2

						# degree to radiant
						snake_case__						:       List[str]       						=  theta / 1_80 * np.pi
						snake_case__						:       Dict       						=  np.cos(_theta     )
						snake_case__						:       List[Any]       						=  np.sin(_theta     )

						# get kernel x
						snake_case__						:       Any       						=  cos_theta * px + sin_theta * py

						# get kernel y
						snake_case__						:       str       						=  -sin_theta * px + cos_theta * py

						# fill kernel
						snake_case__						:       List[str]       						=  np.exp(
						    -(_x**2 + gamma**2 * _y**2) / (2 * sigma**2)     ) * np.cos(2 * np.pi * _x / lambd + psi     )

		return gabor


if __name__ == "__main__":
					import doctest

					doctest.testmod()
					# read original image
					lowerCAmelCase__						:       List[str]										=						imread("""../image_data/lena.jpg""")
					# turn image in gray scale value
					lowerCAmelCase__						:       List[str]										=						cvtColor(img, COLOR_BGR2GRAY)

					# Apply multiple Kernel to detect edges
					lowerCAmelCase__						:       Dict										=						np.zeros(gray.shape[:2])
					for theta in [0, 30, 60, 90, 120, 150]:
										lowerCAmelCase__						:       List[str]										=						gabor_filter_kernel(10, 8, theta, 10, 0, 0)
										out += filteraD(gray, CV_8UC3, kernel_aa)
					lowerCAmelCase__						:       Optional[Any]										=						out / out.max() * 255
					lowerCAmelCase__						:       List[Any]										=						out.astype(np.uinta)

					imshow("""Original""", gray)
					imshow("""Gabor filter with 20x20 mask and 6 directions""", out)

					waitKey(0)






'''simple docstring'''


from collections.abc import Generator




def 	_a       (				):

		"""simple docstring"""

		snake_case__						,       snake_case__						:       List[Any]       						=  0, 1
		while True:
				snake_case__						,       snake_case__						:       str       						=  b, a + b
				yield b




def 	_a       (				__lowerCAmelCase		:      int = 10_00     ):

		"""simple docstring"""

		snake_case__						:       Optional[int]       						=  1
		snake_case__						:       Tuple       						=  fibonacci_generator()
		while len(str(next(__lowerCAmelCase     )     )     ) < n:
				answer += 1
		return answer + 1


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



