





import unittest

import numpy as np

from transformers.testing_utils import require_torch, require_vision
from transformers.utils import is_torch_available, is_vision_available

from ...test_image_processing_common import ImageProcessingSavingTestMixin, prepare_image_inputs


if is_torch_available():
							import torch

if is_vision_available():
							from PIL import Image

							from transformers import ViTImageProcessor
class     UpperCamelCase__					(     unittest.TestCase				):






		'''simple docstring'''






		def __init__(							self,   snake_case__,   snake_case__=13,   snake_case__=3,   snake_case__=2_24,   snake_case__=30,   snake_case__=4_00,   snake_case__=True,   snake_case__=None,   snake_case__=True,   snake_case__=[0.5, 0.5, 0.5],   snake_case__=[0.5, 0.5, 0.5],   )       -> Union[str, Any]:






									"""simple docstring"""
									lowercase_	:   Union[str, Any]  				=     size if size is not None else {"""height""": 18, """width""": 18}
									lowercase_	:   Optional[Any]  				=     parent
									lowercase_	:   str  				=     batch_size
									lowercase_	:   Tuple  				=     num_channels
									lowercase_	:   List[str]  				=     image_size
									lowercase_	:   int  				=     min_resolution
									lowercase_	:   Union[str, Any]  				=     max_resolution
									lowercase_	:   Any  				=     do_resize
									lowercase_	:   Optional[int]  				=     size
									lowercase_	:   List[str]  				=     do_normalize
									lowercase_	:   Optional[int]  				=     image_mean
									lowercase_	:   List[str]  				=     image_std






		def 						snake_case__				(							self  )       -> List[Any]:






									"""simple docstring"""
									return {
									    "image_mean": self.image_mean,
									    "image_std": self.image_std,
									    "do_normalize": self.do_normalize,
									    "do_resize": self.do_resize,
									    "size": self.size,
									}




@require_torch
@require_vision
class     UpperCamelCase__					(     lowerCamelCase__				, unittest.TestCase				):






		'''simple docstring'''






		__a       :       Union[str, Any]       =	ViTImageProcessor if is_vision_available() else None






		def 						snake_case__				(							self  )       -> Any:






									"""simple docstring"""
									lowercase_	:   Tuple  				=     EfficientFormerImageProcessorTester(self  )






		@property
		def 						snake_case__				(							self  )       -> Optional[Any]:






									"""simple docstring"""
									return self.image_proc_tester.prepare_image_processor_dict()






		def 						snake_case__				(							self  )       -> Optional[int]:






									"""simple docstring"""
									lowercase_	:   Dict  				=     self.image_processing_class(**self.image_processor_dict  )
									self.assertTrue(hasattr(snake_case__,   """image_mean"""  )  )
									self.assertTrue(hasattr(snake_case__,   """image_std"""  )  )
									self.assertTrue(hasattr(snake_case__,   """do_normalize"""  )  )
									self.assertTrue(hasattr(snake_case__,   """do_resize"""  )  )
									self.assertTrue(hasattr(snake_case__,   """size"""  )  )






		def 						snake_case__				(							self  )       -> Optional[Any]:






									"""simple docstring"""
									pass






		def 						snake_case__				(							self  )       -> List[Any]:






									"""simple docstring"""
									# Initialize image_processor
									lowercase_	:   Union[str, Any]  				=     self.image_processing_class(**self.image_processor_dict  )
									# create random PIL images
									lowercase_	:   int  				=     prepare_image_inputs(self.image_proc_tester,   equal_resolution=snake_case__  )
									for image in image_inputs:
																self.assertIsInstance(snake_case__,   Image.Image  )

									# Test not batched input
									lowercase_	:   Any  				=     image_processor(image_inputs[0],   return_tensors="""pt"""  ).pixel_values
									self.assertEqual(
									    encoded_images.shape,   (
									        1,
									        self.image_proc_tester.num_channels,
									        self.image_proc_tester.size["""height"""],
									        self.image_proc_tester.size["""width"""],
									    ),   )

									# Test batched
									lowercase_	:   Any  				=     image_processor(snake_case__,   return_tensors="""pt"""  ).pixel_values
									self.assertEqual(
									    encoded_images.shape,   (
									        self.image_proc_tester.batch_size,
									        self.image_proc_tester.num_channels,
									        self.image_proc_tester.size["""height"""],
									        self.image_proc_tester.size["""width"""],
									    ),   )






		def 						snake_case__				(							self  )       -> Optional[Any]:






									"""simple docstring"""
									# Initialize image_processor
									lowercase_	:   Tuple  				=     self.image_processing_class(**self.image_processor_dict  )
									# create random numpy tensors
									lowercase_	:   Optional[int]  				=     prepare_image_inputs(self.image_proc_tester,   equal_resolution=snake_case__,   numpify=snake_case__  )
									for image in image_inputs:
																self.assertIsInstance(snake_case__,   np.ndarray  )

									# Test not batched input
									lowercase_	:   Any  				=     image_processor(image_inputs[0],   return_tensors="""pt"""  ).pixel_values
									self.assertEqual(
									    encoded_images.shape,   (
									        1,
									        self.image_proc_tester.num_channels,
									        self.image_proc_tester.size["""height"""],
									        self.image_proc_tester.size["""width"""],
									    ),   )

									# Test batched
									lowercase_	:   Dict  				=     image_processor(snake_case__,   return_tensors="""pt"""  ).pixel_values
									self.assertEqual(
									    encoded_images.shape,   (
									        self.image_proc_tester.batch_size,
									        self.image_proc_tester.num_channels,
									        self.image_proc_tester.size["""height"""],
									        self.image_proc_tester.size["""width"""],
									    ),   )






		def 						snake_case__				(							self  )       -> int:






									"""simple docstring"""
									# Initialize image_processor
									lowercase_	:   Optional[Any]  				=     self.image_processing_class(**self.image_processor_dict  )
									# create random PyTorch tensors
									lowercase_	:   Optional[int]  				=     prepare_image_inputs(self.image_proc_tester,   equal_resolution=snake_case__,   torchify=snake_case__  )
									for image in image_inputs:
																self.assertIsInstance(snake_case__,   torch.Tensor  )

									# Test not batched input
									lowercase_	:   int  				=     image_processor(image_inputs[0],   return_tensors="""pt"""  ).pixel_values
									self.assertEqual(
									    encoded_images.shape,   (
									        1,
									        self.image_proc_tester.num_channels,
									        self.image_proc_tester.size["""height"""],
									        self.image_proc_tester.size["""width"""],
									    ),   )

									# Test batched
									lowercase_	:   Union[str, Any]  				=     image_processor(snake_case__,   return_tensors="""pt"""  ).pixel_values
									self.assertEqual(
									    encoded_images.shape,   (
									        self.image_proc_tester.batch_size,
									        self.image_proc_tester.num_channels,
									        self.image_proc_tester.size["""height"""],
									        self.image_proc_tester.size["""width"""],
									    ),   )






def  __magic_name__  (				lowercase = 1000				)				-> int:

							"""simple docstring"""



							lowercase_				,		lowercase_	:   Optional[Any]  				=     1, 1
							lowercase_	:   Tuple  				=     2
							while True:
														lowercase_	:   Dict  				=     0
														lowercase_	:   List[Any]  				=     fa + fa
														lowercase_				,		lowercase_	:   List[str]  				=     fa, f
														index += 1
														for _ in str(lowercase				):
																					i += 1
														if i == n:
																					break
							return index


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