


'''simple docstring'''




from typing import List, Optional, Union

import numpy as np
import PIL.Image

from ...image_processing_utils import BaseImageProcessor, BatchFeature
from ...image_transforms import rescale, resize, to_channel_dimension_format
from ...image_utils import (
    ChannelDimension,
    PILImageResampling,
    get_image_size,
    make_list_of_images,
    to_numpy_array,
    valid_images,
)
from ...utils import TensorType, logging


_a   :   str												=   logging.get_logger(__name__)




class 			_lowercase (	__lowercase							):
   _SCREAMING_SNAKE_CASE  :  List[Any]          =	["pixel_values"]
   def __init__(						self       :      List[str]       ,   SCREAMING_SNAKE_CASE_       :      bool = True       ,   SCREAMING_SNAKE_CASE_       :      int = 32       ,   SCREAMING_SNAKE_CASE_       :      Union[str, Any]=PILImageResampling.BILINEAR       ,   SCREAMING_SNAKE_CASE_       :      bool = True       ,   **SCREAMING_SNAKE_CASE_       :      List[Any]       ,   ) ->							None:
        __snake_case           =						do_resize
        __snake_case           =						do_rescale
        __snake_case           =						size_divisor
        __snake_case           =						resample
        super().__init__(**SCREAMING_SNAKE_CASE_      )
   def a  (						self       :      Dict       ,   SCREAMING_SNAKE_CASE_       :      np.ndarray       ,   SCREAMING_SNAKE_CASE_       :      int       ,   SCREAMING_SNAKE_CASE_       :      List[str]       ,   SCREAMING_SNAKE_CASE_       :      Optional[ChannelDimension] = None       ,   **SCREAMING_SNAKE_CASE_       :      Tuple      ) ->							np.ndarray:
        __snake_case      ,       __snake_case           =						get_image_size(SCREAMING_SNAKE_CASE_      )
        # Rounds the height and width down to the closest multiple of size_divisor
        __snake_case           =						height // size_divisor * size_divisor
        __snake_case           =						width // size_divisor * size_divisor
        __snake_case           =						resize(SCREAMING_SNAKE_CASE_       ,   (new_h, new_w)       ,   resample=SCREAMING_SNAKE_CASE_       ,   data_format=SCREAMING_SNAKE_CASE_       ,   **SCREAMING_SNAKE_CASE_      )
        return image
   def a  (						self       :      Union[str, Any]       ,   SCREAMING_SNAKE_CASE_       :      np.ndarray       ,   SCREAMING_SNAKE_CASE_       :      float       ,   SCREAMING_SNAKE_CASE_       :      Optional[ChannelDimension] = None       ,   **SCREAMING_SNAKE_CASE_       :      List[str]      ) ->							np.ndarray:
        return rescale(image=SCREAMING_SNAKE_CASE_       ,   scale=SCREAMING_SNAKE_CASE_       ,   data_format=SCREAMING_SNAKE_CASE_       ,   **SCREAMING_SNAKE_CASE_      )





   def a  (						self       :      Any       ,   SCREAMING_SNAKE_CASE_       :      Union["PIL.Image.Image", TensorType, List["PIL.Image.Image"], List[TensorType]]       ,   SCREAMING_SNAKE_CASE_       :      Optional[bool] = None       ,   SCREAMING_SNAKE_CASE_       :      Optional[int] = None       ,   SCREAMING_SNAKE_CASE_       :      Dict=None       ,   SCREAMING_SNAKE_CASE_       :      Optional[bool] = None       ,   SCREAMING_SNAKE_CASE_       :      Optional[Union[TensorType, str]] = None       ,   SCREAMING_SNAKE_CASE_       :      ChannelDimension = ChannelDimension.FIRST       ,   **SCREAMING_SNAKE_CASE_       :      List[str]       ,   ) ->							BatchFeature:
        __snake_case           =						do_resize if do_resize is not None else self.do_resize
        __snake_case           =						do_rescale if do_rescale is not None else self.do_rescale
        __snake_case           =						size_divisor if size_divisor is not None else self.size_divisor
        __snake_case           =						resample if resample is not None else self.resample

        if do_resize and size_divisor is None:
             raise ValueError('size_divisor is required for resizing'      )

        __snake_case           =						make_list_of_images(SCREAMING_SNAKE_CASE_      )

        if not valid_images(SCREAMING_SNAKE_CASE_      ):
             raise ValueError('Invalid image(s)'      )

        # All transformations expect numpy arrays.
        __snake_case           =						[to_numpy_array(SCREAMING_SNAKE_CASE_      ) for img in images]

        if do_resize:
             __snake_case           =						[self.resize(SCREAMING_SNAKE_CASE_       ,   size_divisor=SCREAMING_SNAKE_CASE_       ,   resample=SCREAMING_SNAKE_CASE_      ) for image in images]

        if do_rescale:
             __snake_case           =						[self.rescale(SCREAMING_SNAKE_CASE_       ,   scale=1 / 255      ) for image in images]

        __snake_case           =						[to_channel_dimension_format(SCREAMING_SNAKE_CASE_       ,   SCREAMING_SNAKE_CASE_      ) for image in images]

        __snake_case           =						{'pixel_values': images}
        return BatchFeature(data=SCREAMING_SNAKE_CASE_       ,   tensor_type=SCREAMING_SNAKE_CASE_      )










'''simple docstring'''

from collections.abc import Generator


def 						__magic_name__       (      )						->   Generator[int, None, None]:

					'''simple docstring'''

					snake_case_     ,snake_case_		     =							0, 1
					while True:
										snake_case_     ,snake_case_		     =							b, a + b
										yield b


def 						__magic_name__       (      __UpperCAmelCase = 1000      )						->   int:

					'''simple docstring'''

					snake_case_		     =							1
					snake_case_		     =							fibonacci_generator()
					while len(str(next(__UpperCAmelCase      )      )      ) < n:
										answer += 1
					return answer + 1


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

