





from typing import Dict, List, Optional, Union

import numpy as np

from ...image_processing_utils import BaseImageProcessor, BatchFeature, get_size_dict
from ...image_transforms import center_crop, normalize, rescale, resize, to_channel_dimension_format
from ...image_utils import (
    IMAGENET_STANDARD_MEAN,
    IMAGENET_STANDARD_STD,
    ChannelDimension,
    ImageInput,
    PILImageResampling,
    make_list_of_images,
    to_numpy_array,
    valid_images,
)
from ...utils import TensorType, is_vision_available, logging


if is_vision_available():
     import PIL


__lowercase	: int       =logging.get_logger(__name__)

class   A							(						__lowercase    ):
      _snake_case				  =['''pixel_values''']



      def __init__(						self:    Tuple		,	_lowerCAmelCase:    bool = True		,	_lowerCAmelCase:    Dict[str, int] = None		,	_lowerCAmelCase:    PILImageResampling = PIL.Image.BICUBIC		,	_lowerCAmelCase:    bool = True		,	_lowerCAmelCase:    Dict[str, int] = None		,	_lowerCAmelCase:    Union[int, float] = 1 / 255		,	_lowerCAmelCase:    bool = True		,	_lowerCAmelCase:    bool = True		,	_lowerCAmelCase:    Optional[Union[float, List[float]]] = None		,	_lowerCAmelCase:    Optional[Union[float, List[float]]] = None		,	**_lowerCAmelCase:    Optional[Any]		,	)    ->     None:
         '''simple docstring'''

         super().__init__(**_lowerCAmelCase							)
         UpperCAmelCase_           =size if size is not None else {"height": 256, "width": 256}
         UpperCAmelCase_           =get_size_dict(_lowerCAmelCase							)
         UpperCAmelCase_           =crop_size if crop_size is not None else {"height": 224, "width": 224}
         UpperCAmelCase_           =get_size_dict(_lowerCAmelCase		,	param_name="crop_size"							)

         UpperCAmelCase_           =do_resize
         UpperCAmelCase_           =size
         UpperCAmelCase_           =resample
         UpperCAmelCase_           =do_center_crop
         UpperCAmelCase_           =crop_size
         UpperCAmelCase_           =do_rescale
         UpperCAmelCase_           =rescale_factor
         UpperCAmelCase_           =do_normalize
         UpperCAmelCase_           =image_mean if image_mean is not None else IMAGENET_STANDARD_MEAN
         UpperCAmelCase_           =image_std if image_std is not None else IMAGENET_STANDARD_STD



      def 						lowerCAmelCase__     (						self:    str		,	_lowerCAmelCase:    np.ndarray		,	_lowerCAmelCase:    Dict[str, int]		,	_lowerCAmelCase:    PILImageResampling = PIL.Image.BICUBIC		,	_lowerCAmelCase:    Optional[Union[str, ChannelDimension]] = None		,	**_lowerCAmelCase:    Union[str, Any]		,	)    ->     np.ndarray:
         '''simple docstring'''

         UpperCAmelCase_           =get_size_dict(_lowerCAmelCase							)
         if "height" not in size or "width" not in size:
            raise ValueError(F'The size dictionary must have keys \'height\' and \'width\'. Got {size.keys()}'							)
         return resize(
             _lowerCAmelCase		,	size=(size["height"], size["width"])		,	resample=_lowerCAmelCase		,	data_format=_lowerCAmelCase		,	**_lowerCAmelCase							)



      def 						lowerCAmelCase__     (						self:    Optional[Any]		,	_lowerCAmelCase:    np.ndarray		,	_lowerCAmelCase:    Dict[str, int]		,	_lowerCAmelCase:    Optional[Union[str, ChannelDimension]] = None		,	**_lowerCAmelCase:    Optional[Any]		,	)    ->     np.ndarray:
         '''simple docstring'''

         UpperCAmelCase_           =get_size_dict(_lowerCAmelCase							)
         if "height" not in size or "width" not in size:
            raise ValueError(F'The size dictionary must have keys \'height\' and \'width\'. Got {size.keys()}'							)
         return center_crop(_lowerCAmelCase		,	size=(size["height"], size["width"])		,	data_format=_lowerCAmelCase		,	**_lowerCAmelCase							)



      def 						lowerCAmelCase__     (						self:    int		,	_lowerCAmelCase:    np.ndarray		,	_lowerCAmelCase:    Union[int, float]		,	_lowerCAmelCase:    Optional[Union[str, ChannelDimension]] = None		,	**_lowerCAmelCase:    int		,	)    ->     Any:
         '''simple docstring'''

         return rescale(_lowerCAmelCase		,	scale=_lowerCAmelCase		,	data_format=_lowerCAmelCase		,	**_lowerCAmelCase							)



      def 						lowerCAmelCase__     (						self:    Dict		,	_lowerCAmelCase:    np.ndarray		,	_lowerCAmelCase:    Union[float, List[float]]		,	_lowerCAmelCase:    Union[float, List[float]]		,	_lowerCAmelCase:    Optional[Union[str, ChannelDimension]] = None		,	**_lowerCAmelCase:    List[Any]		,	)    ->     np.ndarray:
         '''simple docstring'''

         return normalize(_lowerCAmelCase		,	mean=_lowerCAmelCase		,	std=_lowerCAmelCase		,	data_format=_lowerCAmelCase		,	**_lowerCAmelCase							)






      def 						lowerCAmelCase__     (						self:    Union[str, Any]		,	_lowerCAmelCase:    ImageInput		,	_lowerCAmelCase:    bool = None		,	_lowerCAmelCase:    Dict[str, int] = None		,	_lowerCAmelCase:    str=None		,	_lowerCAmelCase:    bool = None		,	_lowerCAmelCase:    Dict[str, int] = None		,	_lowerCAmelCase:    bool = None		,	_lowerCAmelCase:    float = None		,	_lowerCAmelCase:    bool = None		,	_lowerCAmelCase:    Optional[Union[float, List[float]]] = None		,	_lowerCAmelCase:    Optional[Union[float, List[float]]] = None		,	_lowerCAmelCase:    Optional[Union[str, TensorType]] = None		,	_lowerCAmelCase:    ChannelDimension = ChannelDimension.FIRST		,	**_lowerCAmelCase:    Optional[int]		,	)    ->     PIL.Image.Image:
         '''simple docstring'''

         UpperCAmelCase_           =do_resize if do_resize is not None else self.do_resize
         UpperCAmelCase_           =resample if resample is not None else self.resample
         UpperCAmelCase_           =do_center_crop if do_center_crop is not None else self.do_center_crop
         UpperCAmelCase_           =do_rescale if do_rescale is not None else self.do_rescale
         UpperCAmelCase_           =rescale_factor if rescale_factor is not None else self.rescale_factor
         UpperCAmelCase_           =do_normalize if do_normalize is not None else self.do_normalize
         UpperCAmelCase_           =image_mean if image_mean is not None else self.image_mean
         UpperCAmelCase_           =image_std if image_std is not None else self.image_std

         UpperCAmelCase_           =size if size is not None else self.size
         UpperCAmelCase_           =get_size_dict(_lowerCAmelCase							)
         UpperCAmelCase_           =crop_size if crop_size is not None else self.crop_size
         UpperCAmelCase_           =get_size_dict(_lowerCAmelCase		,	param_name="crop_size"							)

         UpperCAmelCase_           =make_list_of_images(_lowerCAmelCase							)

         if not valid_images(_lowerCAmelCase							):
            raise ValueError(
                "Invalid image type. Must be of type PIL.Image.Image, numpy.ndarray, "
                "torch.Tensor, tf.Tensor or jax.ndarray."							)

         if do_resize and size is None or resample is None:
            raise ValueError("Size and resample must be specified if do_resize is True."							)

         if do_center_crop and crop_size is None:
            raise ValueError("Crop size must be specified if do_center_crop is True."							)

         if do_rescale and rescale_factor is None:
            raise ValueError("Rescale factor must be specified if do_rescale is True."							)

         if do_normalize and (image_mean is None or image_std is None):
            raise ValueError("Image mean and std must be specified if do_normalize is True."							)

         # All transformations expect numpy arrays.
         UpperCAmelCase_           =[to_numpy_array(_lowerCAmelCase							) for image in images]

         if do_resize:
            UpperCAmelCase_           =[self.resize(image=_lowerCAmelCase		,	size=_lowerCAmelCase		,	resample=_lowerCAmelCase							) for image in images]

         if do_center_crop:
            UpperCAmelCase_           =[self.center_crop(image=_lowerCAmelCase		,	size=_lowerCAmelCase							) for image in images]

         if do_rescale:
            UpperCAmelCase_           =[self.rescale(image=_lowerCAmelCase		,	scale=_lowerCAmelCase							) for image in images]

         if do_normalize:
            UpperCAmelCase_           =[self.normalize(image=_lowerCAmelCase		,	mean=_lowerCAmelCase		,	std=_lowerCAmelCase							) for image in images]

         UpperCAmelCase_           =[to_channel_dimension_format(_lowerCAmelCase		,	_lowerCAmelCase							) for image in images]

         UpperCAmelCase_           ={"pixel_values": images}
         return BatchFeature(data=_lowerCAmelCase		,	tensor_type=_lowerCAmelCase							)









def      __lowercase(						UpperCAmelCase__			):


      """simple docstring"""



      if n == 1 or not isinstance(UpperCAmelCase__ , UpperCAmelCase__			):
            return 0
      elif n == 2:
            return 1
      else:
            lowerCamelCase             =		[0, 1]
            for i in range(2 , n + 1			):
                  sequence.append(sequence[i - 1] + sequence[i - 2]			)

            return sequence[n]

def      __lowercase(						UpperCAmelCase__			):


      """simple docstring"""



      lowerCamelCase             =		0
      lowerCamelCase             =		2

      while digits < n:
            index += 1
            lowerCamelCase             =		len(str(fibonacci(UpperCAmelCase__			)			)			)

      return index

def      __lowercase(						UpperCAmelCase__ = 1000			):


      """simple docstring"""



      return fibonacci_digits_index(UpperCAmelCase__			)


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