


'''simple docstring'''






from typing import Dict, Iterable, List, Optional, Union

import numpy as np

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


lowercase				=logging.get_logger(__name__)






class    __magic_name__				(						__UpperCamelCase							):
       UpperCAmelCase		 =["pixel_values"]






       def __init__(     self    ,				snake_case = True    ,				snake_case = None    ,				snake_case = PILImageResampling.BICUBIC    ,				snake_case = True    ,				snake_case = None    ,				snake_case = True    ,				snake_case = 1 / 2_5_5    ,				snake_case = True    ,				snake_case = IMAGENET_DEFAULT_MEAN    ,				snake_case = IMAGENET_DEFAULT_STD    ,				**snake_case    ,				)		->    List[Any]:




          '''simple docstring'''
          super().__init__(**snake_case__)
          _UpperCAmelCase  :  Dict				       =size if size is not None else {'shortest_edge': 2_2_4}
          _UpperCAmelCase  :  List[str]				       =get_size_dict(snake_case__    ,				default_to_square=snake_case__)
          _UpperCAmelCase  :  List[Any]				       =crop_size if crop_size is not None else {'height': 2_2_4, 'width': 2_2_4}
          _UpperCAmelCase  :  int				       =get_size_dict(snake_case__    ,				param_name='crop_size')

          _UpperCAmelCase  :  Any				       =do_resize
          _UpperCAmelCase  :  Dict				       =size
          _UpperCAmelCase  :  str				       =resample
          _UpperCAmelCase  :  Optional[int]				       =do_center_crop
          _UpperCAmelCase  :  List[Any]				       =crop_size
          _UpperCAmelCase  :  Union[str, Any]				       =do_rescale
          _UpperCAmelCase  :  Any				       =rescale_factor
          _UpperCAmelCase  :  Union[str, Any]				       =do_normalize
          _UpperCAmelCase  :  Any				       =image_mean if image_mean is not None else IMAGENET_DEFAULT_MEAN
          _UpperCAmelCase  :  str				       =image_std if image_std is not None else IMAGENET_DEFAULT_STD






       def      lowerCAmelCase						(     self    ,				snake_case    ,				snake_case    ,				snake_case = PILImageResampling.BICUBIC    ,				snake_case = None    ,				**snake_case    ,				)		->    Optional[Any]:




          '''simple docstring'''
          _UpperCAmelCase  :  Any				       =get_size_dict(snake_case__    ,				default_to_square=snake_case__)
          # size_dict is a dict with either keys "height" and "width" or "shortest_edge"
          if "shortest_edge" in size:
             _UpperCAmelCase  :  Optional[Any]				       =int((2_5_6 / 2_2_4) * size['shortest_edge'])
             _UpperCAmelCase  :  Any				       =get_resize_output_image_size(snake_case__    ,				size=snake_case__    ,				default_to_square=snake_case__)
             _UpperCAmelCase  :  str				       ={'height': output_size[0], 'width': output_size[1]}
          if "height" not in size_dict or "width" not in size_dict:
             raise ValueError(
                 f"Size dict must have keys 'height' and 'width' or 'shortest_edge'. Got {size_dict.keys()}")
          return resize(
              snake_case__    ,				size=(size_dict['height'], size_dict['width'])    ,				resample=snake_case__    ,				data_format=snake_case__    ,				**snake_case__)






       def      lowerCAmelCase						(     self    ,				snake_case    ,				snake_case    ,				snake_case = None    ,				**snake_case    ,				)		->    Tuple:




          '''simple docstring'''
          _UpperCAmelCase  :  Dict				       =get_size_dict(snake_case__)
          if "height" not in size or "width" not in size:
             raise ValueError(f"Size dict must have keys 'height' and 'width'. Got {size.keys()}")
          return center_crop(snake_case__    ,				size=(size['height'], size['width'])    ,				data_format=snake_case__    ,				**snake_case__)






       def      lowerCAmelCase						(     self    ,				snake_case    ,				snake_case    ,				snake_case = None    ,				**snake_case    ,				)		->    Dict:




          '''simple docstring'''
          return rescale(snake_case__    ,				scale=snake_case__    ,				data_format=snake_case__    ,				**snake_case__)






       def      lowerCAmelCase						(     self    ,				snake_case    ,				snake_case    ,				snake_case    ,				snake_case = None    ,				**snake_case    ,				)		->    str:




          '''simple docstring'''
          return normalize(snake_case__    ,				mean=snake_case__    ,				std=snake_case__    ,				data_format=snake_case__    ,				**snake_case__)






       def      lowerCAmelCase						(     self    ,				snake_case    ,				snake_case = None    ,				snake_case = None    ,				snake_case = None    ,				snake_case = None    ,				snake_case = None    ,				snake_case = None    ,				snake_case = None    ,				snake_case = None    ,				snake_case = None    ,				snake_case = None    ,				snake_case = None    ,				snake_case = ChannelDimension.FIRST    ,				**snake_case    ,				)		->    str:




          '''simple docstring'''
          _UpperCAmelCase  :  Optional[Any]				       =do_resize if do_resize is not None else self.do_resize
          _UpperCAmelCase  :  Dict				       =resample if resample is not None else self.resample
          _UpperCAmelCase  :  str				       =do_center_crop if do_center_crop is not None else self.do_center_crop
          _UpperCAmelCase  :  str				       =do_rescale if do_rescale is not None else self.do_rescale
          _UpperCAmelCase  :  Tuple				       =rescale_factor if rescale_factor is not None else self.rescale_factor
          _UpperCAmelCase  :  Any				       =do_normalize if do_normalize is not None else self.do_normalize
          _UpperCAmelCase  :  Union[str, Any]				       =image_mean if image_mean is not None else self.image_mean
          _UpperCAmelCase  :  Tuple				       =image_std if image_std is not None else self.image_std

          _UpperCAmelCase  :  List[str]				       =size if size is not None else self.size
          _UpperCAmelCase  :  Any				       =get_size_dict(snake_case__    ,				default_to_square=snake_case__)
          _UpperCAmelCase  :  Union[str, Any]				       =crop_size if crop_size is not None else self.crop_size
          _UpperCAmelCase  :  List[Any]				       =get_size_dict(snake_case__    ,				param_name='crop_size')

          _UpperCAmelCase  :  Dict				       =make_list_of_images(snake_case__)

          if not valid_images(snake_case__):
             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:
             raise ValueError('Size 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  :  int				       =[to_numpy_array(snake_case__) for image in images]

          if do_resize:
             _UpperCAmelCase  :  List[str]				       =[self.resize(snake_case__    ,				snake_case__    ,				snake_case__) for image in images]

          if do_center_crop:
             _UpperCAmelCase  :  int				       =[self.center_crop(snake_case__    ,				snake_case__) for image in images]

          if do_rescale:
             _UpperCAmelCase  :  List[Any]				       =[self.rescale(snake_case__    ,				snake_case__) for image in images]

          if do_normalize:
             _UpperCAmelCase  :  Tuple				       =[self.normalize(snake_case__    ,				snake_case__    ,				snake_case__) for image in images]

          _UpperCAmelCase  :  List[str]				       =[to_channel_dimension_format(snake_case__    ,				snake_case__) for image in images]

          _UpperCAmelCase  :  Tuple				       ={'pixel_values': images}
          return BatchFeature(data=snake_case__    ,				tensor_type=snake_case__)


"""simple docstring"""




from collections.abc import Generator







def 				_UpperCAmelCase		(							):





		"""simple docstring"""




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







def 				_UpperCAmelCase		(							lowerCamelCase__ = 1000  ):





		"""simple docstring"""




		lowerCAmelCase__   = 1
		lowerCAmelCase__   = fibonacci_generator()
		while len(str(next(lowerCamelCase__  )  )  ) < n:
				answer += 1
		return answer + 1


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




