





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 DeiTImageProcessor
class       UpperCamelCase_		(	unittest.TestCase       ):




					def __init__(		self					,    lowerCAmelCase_					,    lowerCAmelCase_=7					,    lowerCAmelCase_=3					,    lowerCAmelCase_=18					,    lowerCAmelCase_=30					,    lowerCAmelCase_=400					,    lowerCAmelCase_=True					,    lowerCAmelCase_=None					,    lowerCAmelCase_=True					,    lowerCAmelCase_=None					,    lowerCAmelCase_=True					,    lowerCAmelCase_=[0.5, 0.5, 0.5]					,    lowerCAmelCase_=[0.5, 0.5, 0.5]					,    )		->				Union[str, Any]:
										_snake_case						=					size if size is not None else {'height': 20, 'width': 20}
										_snake_case						=					crop_size if crop_size is not None else {'height': 18, 'width': 18}

										_snake_case						=					parent
										_snake_case						=					batch_size
										_snake_case						=					num_channels
										_snake_case						=					image_size
										_snake_case						=					min_resolution
										_snake_case						=					max_resolution
										_snake_case						=					do_resize
										_snake_case						=					size
										_snake_case						=					do_center_crop
										_snake_case						=					crop_size
										_snake_case						=					do_normalize
										_snake_case						=					image_mean
										_snake_case						=					image_std






					def 						lowerCAmelCase      (		self	)		->				int:
										return {
										    "do_resize": self.do_resize,
										    "size": self.size,
										    "do_center_crop": self.do_center_crop,
										    "crop_size": self.crop_size,
										    "do_normalize": self.do_normalize,
										    "image_mean": self.image_mean,
										    "image_std": self.image_std,
										}





@require_torch
@require_vision
class       UpperCamelCase_		(	_lowerCamelCase				,	unittest.TestCase       ):
					lowerCAmelCase_				=						DeiTImageProcessor if is_vision_available() else None
					lowerCAmelCase_				=						True




					def 						lowerCAmelCase      (		self	)		->				Any:
										_snake_case						=					DeiTImageProcessingTester(self	)




					@property
					def 						lowerCAmelCase      (		self	)		->				Optional[Any]:
										return self.image_processor_tester.prepare_image_processor_dict()




					def 						lowerCAmelCase      (		self	)		->				Optional[int]:
										_snake_case						=					self.image_processing_class(**self.image_processor_dict	)
										self.assertTrue(hasattr(lowerCAmelCase_					,    'do_resize'	)	)
										self.assertTrue(hasattr(lowerCAmelCase_					,    'size'	)	)
										self.assertTrue(hasattr(lowerCAmelCase_					,    'do_center_crop'	)	)
										self.assertTrue(hasattr(lowerCAmelCase_					,    'center_crop'	)	)
										self.assertTrue(hasattr(lowerCAmelCase_					,    'do_normalize'	)	)
										self.assertTrue(hasattr(lowerCAmelCase_					,    'image_mean'	)	)
										self.assertTrue(hasattr(lowerCAmelCase_					,    'image_std'	)	)




					def 						lowerCAmelCase      (		self	)		->				Union[str, Any]:
										_snake_case						=					self.image_processing_class.from_dict(self.image_processor_dict	)
										self.assertEqual(image_processor.size					,    {'height': 20, 'width': 20}	)
										self.assertEqual(image_processor.crop_size					,    {'height': 18, 'width': 18}	)

										_snake_case						=					self.image_processing_class.from_dict(self.image_processor_dict					,    size=42					,    crop_size=84	)
										self.assertEqual(image_processor.size					,    {'height': 42, 'width': 42}	)
										self.assertEqual(image_processor.crop_size					,    {'height': 84, 'width': 84}	)




					def 						lowerCAmelCase      (		self	)		->				List[Any]:
										pass




					def 						lowerCAmelCase      (		self	)		->				Optional[Any]:
										# Initialize image_processing
										_snake_case						=					self.image_processing_class(**self.image_processor_dict	)
										# create random PIL images
										_snake_case						=					prepare_image_inputs(self.image_processor_tester					,    equal_resolution=lowerCAmelCase_	)
										for image in image_inputs:
															self.assertIsInstance(lowerCAmelCase_					,    Image.Image	)

										# Test not batched input
										_snake_case						=					image_processing(image_inputs[0]					,    return_tensors='pt'	).pixel_values
										self.assertEqual(
										    encoded_images.shape					,    (
										        1,
										        self.image_processor_tester.num_channels,
										        self.image_processor_tester.crop_size['height'],
										        self.image_processor_tester.crop_size['width'],
										    )					,    )

										# Test batched
										_snake_case						=					image_processing(lowerCAmelCase_					,    return_tensors='pt'	).pixel_values
										self.assertEqual(
										    encoded_images.shape					,    (
										        self.image_processor_tester.batch_size,
										        self.image_processor_tester.num_channels,
										        self.image_processor_tester.crop_size['height'],
										        self.image_processor_tester.crop_size['width'],
										    )					,    )




					def 						lowerCAmelCase      (		self	)		->				Optional[Any]:
										# Initialize image_processing
										_snake_case						=					self.image_processing_class(**self.image_processor_dict	)
										# create random numpy tensors
										_snake_case						=					prepare_image_inputs(self.image_processor_tester					,    equal_resolution=lowerCAmelCase_					,    numpify=lowerCAmelCase_	)
										for image in image_inputs:
															self.assertIsInstance(lowerCAmelCase_					,    np.ndarray	)

										# Test not batched input
										_snake_case						=					image_processing(image_inputs[0]					,    return_tensors='pt'	).pixel_values
										self.assertEqual(
										    encoded_images.shape					,    (
										        1,
										        self.image_processor_tester.num_channels,
										        self.image_processor_tester.crop_size['height'],
										        self.image_processor_tester.crop_size['width'],
										    )					,    )

										# Test batched
										_snake_case						=					image_processing(lowerCAmelCase_					,    return_tensors='pt'	).pixel_values
										self.assertEqual(
										    encoded_images.shape					,    (
										        self.image_processor_tester.batch_size,
										        self.image_processor_tester.num_channels,
										        self.image_processor_tester.crop_size['height'],
										        self.image_processor_tester.crop_size['width'],
										    )					,    )






					def 						lowerCAmelCase      (		self	)		->				Union[str, Any]:
										# Initialize image_processing
										_snake_case						=					self.image_processing_class(**self.image_processor_dict	)
										# create random PyTorch tensors
										_snake_case						=					prepare_image_inputs(self.image_processor_tester					,    equal_resolution=lowerCAmelCase_					,    torchify=lowerCAmelCase_	)
										for image in image_inputs:
															self.assertIsInstance(lowerCAmelCase_					,    torch.Tensor	)

										# Test not batched input
										_snake_case						=					image_processing(image_inputs[0]					,    return_tensors='pt'	).pixel_values
										self.assertEqual(
										    encoded_images.shape					,    (
										        1,
										        self.image_processor_tester.num_channels,
										        self.image_processor_tester.crop_size['height'],
										        self.image_processor_tester.crop_size['width'],
										    )					,    )

										# Test batched
										_snake_case						=					image_processing(lowerCAmelCase_					,    return_tensors='pt'	).pixel_values
										self.assertEqual(
										    encoded_images.shape					,    (
										        self.image_processor_tester.batch_size,
										        self.image_processor_tester.num_channels,
										        self.image_processor_tester.crop_size['height'],
										        self.image_processor_tester.crop_size['width'],
										    )					,    )










def     lowerCamelCase__  (  UpperCamelCase__      :							int = 100    )      ->			int:



					'''simple docstring'''




					_snake_case						=					1
					_snake_case						=					0
					for i in range(1							,     num + 1    ):
										fact *= i

					for j in str(UpperCamelCase__    ):
										result += int(UpperCamelCase__    )

					return result


if __name__ == "__main__":
					print(solution(int(input("""Enter the Number: """).strip())))



