






"""simple docstring"""



import numpy as np
import torch
import torch.nn as nn
from transformers import CLIPConfig, CLIPVisionModelWithProjection, PreTrainedModel

from ...utils import logging


__A		:       str  				=		logging.get_logger(__name__)





class 					_UpperCAmelCase       ( _A							):
					SCREAMING_SNAKE_CASE_		:				Any							    =   CLIPConfig

					SCREAMING_SNAKE_CASE_		:				Optional[Any]							    =   ["CLIPEncoderLayer"]




					def __init__(				self     :						List[str]    ,						A     :						CLIPConfig   )  ->  str:
							super().__init__(A   )

							lowercase_ : Union[str, Any]							       =   CLIPVisionModelWithProjection(config.vision_config   )

							lowercase_ : Optional[int]							       =   nn.Linear(config.vision_config.projection_dim    ,						1   )
							lowercase_ : Optional[Any]							       =   nn.Linear(config.vision_config.projection_dim    ,						1   )






					@torch.no_grad()
					def   A  (				self     :						List[str]    ,						A     :						Union[str, Any]    ,						A     :						Tuple    ,						A     :						List[str]=0.5    ,						A     :						int=0.5   )  ->  Dict:
							lowercase_ : Any							       =   self.vision_model(A   )[0]

							lowercase_ : Dict							       =   self.p_head(A   )
							lowercase_ : str							       =   nsfw_detected.flatten()
							lowercase_ : Optional[Any]							       =   nsfw_detected > p_threshold
							lowercase_ : int							       =   nsfw_detected.tolist()

							if any(A   ):
									logger.warning(
									    '''Potential NSFW content was detected in one or more images. A black image will be returned instead.'''
									    ''' Try again with a different prompt and/or seed.'''   )

							for idx, nsfw_detected_ in enumerate(A   ):
									if nsfw_detected_:
											lowercase_ : Optional[int]							       =   np.zeros(images[idx].shape   )

							lowercase_ : Optional[int]							       =   self.w_head(A   )
							lowercase_ : List[str]							       =   watermark_detected.flatten()
							lowercase_ : int							       =   watermark_detected > w_threshold
							lowercase_ : Tuple							       =   watermark_detected.tolist()

							if any(A   ):
									logger.warning(
									    '''Potential watermarked content was detected in one or more images. A black image will be returned instead.'''
									    ''' Try again with a different prompt and/or seed.'''   )

							for idx, watermark_detected_ in enumerate(A   ):
									if watermark_detected_:
											lowercase_ : int							       =   np.zeros(images[idx].shape   )

							return images, nsfw_detected, watermark_detected











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



