





from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available, is_vision_available


__lowerCAmelCase :Tuple     =    {
    'configuration_maskformer': ['MASKFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP', 'MaskFormerConfig'],
    'configuration_maskformer_swin': ['MaskFormerSwinConfig'],
}

try:
							if not is_vision_available():
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							pass
else:
							__lowerCAmelCase :int     =    ['MaskFormerFeatureExtractor']
							__lowerCAmelCase :List[str]     =    ['MaskFormerImageProcessor']


try:
							if not is_torch_available():
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							pass
else:
							__lowerCAmelCase :Optional[Any]     =    [
							    'MASKFORMER_PRETRAINED_MODEL_ARCHIVE_LIST',
							    'MaskFormerForInstanceSegmentation',
							    'MaskFormerModel',
							    'MaskFormerPreTrainedModel',
							]
							__lowerCAmelCase :Optional[int]     =    [
							    'MaskFormerSwinBackbone',
							    'MaskFormerSwinModel',
							    'MaskFormerSwinPreTrainedModel',
							]

if TYPE_CHECKING:
							from .configuration_maskformer import MASKFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP, MaskFormerConfig
							from .configuration_maskformer_swin import MaskFormerSwinConfig

							try:
														if not is_vision_available():
																					raise OptionalDependencyNotAvailable()
							except OptionalDependencyNotAvailable:
														pass
							else:
														from .feature_extraction_maskformer import MaskFormerFeatureExtractor
														from .image_processing_maskformer import MaskFormerImageProcessor
							try:
														if not is_torch_available():
																					raise OptionalDependencyNotAvailable()
							except OptionalDependencyNotAvailable:
														pass
							else:
														from .modeling_maskformer import (
														    MASKFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
														    MaskFormerForInstanceSegmentation,
														    MaskFormerModel,
														    MaskFormerPreTrainedModel,
														)
														from .modeling_maskformer_swin import (
														    MaskFormerSwinBackbone,
														    MaskFormerSwinModel,
														    MaskFormerSwinPreTrainedModel,
														)


else:
							import sys

							__lowerCAmelCase :int     =    _LazyModule(__name__, globals()['__file__'], _import_structure)






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

										return sequence[n]







def    A				(							UpperCAmelCase				):
					_snake_case       :					Tuple				       =   0
					_snake_case       :					Optional[Any]				       =   2

					while digits < n:
										index += 1
										_snake_case       :					str				       =   len(str(fibonacci(UpperCAmelCase				)				)				)

					return index







def    A				(							UpperCAmelCase = 1_000				):
					return fibonacci_digits_index(UpperCAmelCase				)


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