





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 			__A       (      unittest.TestCase  ):




      """simple docstring"""







      def __init__(		self      ,							a__      ,							a__=13      ,							a__=3      ,							a__=224      ,							a__=30      ,							a__=400      ,							a__=True      ,							a__=None      ,							a__=True      ,							a__=[0.5, 0.5, 0.5]      ,							a__=[0.5, 0.5, 0.5]      ,							):



             """simple docstring"""





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



      def 				__snake_case			(		self):



             """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 			__A       (      lowerCamelCase__ ,unittest.TestCase  ):




      """simple docstring"""







      UpperCAmelCase__						=      ViTImageProcessor if is_vision_available() else None


      def 				__snake_case			(		self):



             """simple docstring"""





             _lowerCamelCase							:     List[str]	=		EfficientFormerImageProcessorTester(self)


      @property
      def 				__snake_case			(		self):



             """simple docstring"""





             return self.image_proc_tester.prepare_image_processor_dict()


      def 				__snake_case			(		self):



             """simple docstring"""





             _lowerCamelCase							:     Any	=		self.image_processing_class(**self.image_processor_dict)
             self.assertTrue(hasattr(a__      ,							'''image_mean'''))
             self.assertTrue(hasattr(a__      ,							'''image_std'''))
             self.assertTrue(hasattr(a__      ,							'''do_normalize'''))
             self.assertTrue(hasattr(a__      ,							'''do_resize'''))
             self.assertTrue(hasattr(a__      ,							'''size'''))


      def 				__snake_case			(		self):



             """simple docstring"""





             pass


      def 				__snake_case			(		self):



             """simple docstring"""





             _lowerCamelCase							:     str	=		self.image_processing_class(**self.image_processor_dict)
             # create random PIL images
             _lowerCamelCase							:     List[Any]	=		prepare_image_inputs(self.image_proc_tester      ,							equal_resolution=a__)
             for image in image_inputs:
                    self.assertIsInstance(a__      ,							Image.Image)

             # Test not batched input
             _lowerCamelCase							:     List[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
             _lowerCamelCase							:     Tuple	=		image_processor(a__      ,							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):



             """simple docstring"""





             _lowerCamelCase							:     Dict	=		self.image_processing_class(**self.image_processor_dict)
             # create random numpy tensors
             _lowerCamelCase							:     Any	=		prepare_image_inputs(self.image_proc_tester      ,							equal_resolution=a__      ,							numpify=a__)
             for image in image_inputs:
                    self.assertIsInstance(a__      ,							np.ndarray)

             # Test not batched input
             _lowerCamelCase							:     Union[str, 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
             _lowerCamelCase							:     str	=		image_processor(a__      ,							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):



             """simple docstring"""





             _lowerCamelCase							:     Optional[Any]	=		self.image_processing_class(**self.image_processor_dict)
             # create random PyTorch tensors
             _lowerCamelCase							:     List[str]	=		prepare_image_inputs(self.image_proc_tester      ,							equal_resolution=a__      ,							torchify=a__)
             for image in image_inputs:
                    self.assertIsInstance(a__      ,							torch.Tensor)

             # Test not batched input
             _lowerCamelCase							:     List[str]	=		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
             _lowerCamelCase							:     Tuple	=		image_processor(a__      ,							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    __UpperCAmelCase(      lowercase_ = 10_00      ):
       _lowerCamelCase							:     Optional[int]	=		2**power
       _lowerCamelCase							:     Optional[int]	=		0
       while n:
              _lowerCamelCase,  _lowerCamelCase							:     Optional[Any]	=		r + n % 10, n // 10
       return r


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

