






'''simple docstring'''






import shutil
import tempfile
import unittest

import numpy as np
import pytest

from transformers import is_speech_available, is_vision_available
from transformers.testing_utils import require_torch


if is_vision_available():
      from transformers import TvltImageProcessor

if is_speech_available():
      from transformers import TvltFeatureExtractor

from transformers import TvltProcessor




@require_torch
class a_    (    unittest.TestCase							):







   def     SCREAMING_SNAKE_CASE__					(self)			->      Optional[Any]:
      """simple docstring"""






      __snake_case				:      List[Any]     							= 'ZinengTang/tvlt-base'
      __snake_case				:      Optional[Any]     							= tempfile.mkdtemp()







   def     SCREAMING_SNAKE_CASE__					(self					,   **__a)			->      Optional[Any]:
      """simple docstring"""






      return TvltImageProcessor.from_pretrained(self.checkpoint					,   **__a)







   def     SCREAMING_SNAKE_CASE__					(self					,   **__a)			->      Tuple:
      """simple docstring"""






      return TvltFeatureExtractor.from_pretrained(self.checkpoint					,   **__a)







   def     SCREAMING_SNAKE_CASE__					(self)			->      str:
      """simple docstring"""






      shutil.rmtree(self.tmpdirname)







   def     SCREAMING_SNAKE_CASE__					(self)			->      List[Any]:
      """simple docstring"""






      __snake_case				:      Optional[int]     							= self.get_image_processor()
      __snake_case				:      Optional[int]     							= self.get_feature_extractor()

      __snake_case				:      Optional[int]     							= TvltProcessor(image_processor=__a					,   feature_extractor=__a)
      processor.save_pretrained(self.tmpdirname)
      __snake_case				:      Optional[int]     							= TvltProcessor.from_pretrained(self.tmpdirname)

      self.assertIsInstance(processor.feature_extractor					,   __a)
      self.assertIsInstance(processor.image_processor					,   __a)







   def     SCREAMING_SNAKE_CASE__					(self)			->      List[str]:
      """simple docstring"""






      __snake_case				:      List[Any]     							= self.get_image_processor()
      __snake_case				:      Union[str, Any]     							= self.get_feature_extractor()

      __snake_case				:      Optional[Any]     							= TvltProcessor(image_processor=__a					,   feature_extractor=__a)

      __snake_case				:      Dict     							= np.ones([1_2_0_0_0])

      __snake_case				:      Tuple     							= feature_extractor(__a					,   return_tensors='np')
      __snake_case				:      int     							= processor(audio=__a					,   return_tensors='np')

      for key in audio_dict.keys():
         self.assertAlmostEqual(audio_dict[key].sum()					,   input_processor[key].sum()					,   delta=1E-2)







   def     SCREAMING_SNAKE_CASE__					(self)			->      int:
      """simple docstring"""






      __snake_case				:      Optional[int]     							= self.get_image_processor()
      __snake_case				:      Union[str, Any]     							= self.get_feature_extractor()

      __snake_case				:      Optional[Any]     							= TvltProcessor(image_processor=__a					,   feature_extractor=__a)

      __snake_case				:      List[str]     							= np.ones([3, 2_2_4, 2_2_4])

      __snake_case				:      Union[str, Any]     							= image_processor(__a					,   return_tensors='np')
      __snake_case				:      Optional[Any]     							= processor(images=__a					,   return_tensors='np')

      for key in image_dict.keys():
         self.assertAlmostEqual(image_dict[key].sum()					,   input_processor[key].sum()					,   delta=1E-2)







   def     SCREAMING_SNAKE_CASE__					(self)			->      Dict:
      """simple docstring"""






      __snake_case				:      Optional[int]     							= self.get_image_processor()
      __snake_case				:      Optional[Any]     							= self.get_feature_extractor()

      __snake_case				:      Dict     							= TvltProcessor(image_processor=__a					,   feature_extractor=__a)

      __snake_case				:      Tuple     							= np.ones([1_2_0_0_0])
      __snake_case				:      Union[str, Any]     							= np.ones([3, 2_2_4, 2_2_4])

      __snake_case				:      List[Any]     							= processor(audio=__a					,   images=__a)

      self.assertListEqual(list(inputs.keys())					,   ['audio_values', 'audio_mask', 'pixel_values', 'pixel_mask'])

      # test if it raises when no input is passed
      with pytest.raises(__a):
         processor()







   def     SCREAMING_SNAKE_CASE__					(self)			->      str:
      """simple docstring"""






      __snake_case				:      int     							= self.get_image_processor()
      __snake_case				:      Union[str, Any]     							= self.get_feature_extractor()

      __snake_case				:      List[Any]     							= TvltProcessor(image_processor=__a					,   feature_extractor=__a)

      self.assertListEqual(
          processor.model_input_names					,   image_processor.model_input_names + feature_extractor.model_input_names					,   msg='`processor` and `image_processor`+`feature_extractor` model input names do not match'					,   )







'''simple docstring'''






def        _SCREAMING_SNAKE_CASE  (				A  :       int  )    -> int:







   """simple docstring"""
   __snake_case				:      str     							= 1
   for i in range(1  ,		num + 1  ):
      fact *= i
   return fact




def        _SCREAMING_SNAKE_CASE  (				A  :       int  )    -> int:







   """simple docstring"""
   __snake_case				:      Union[str, Any]     							= 0
   while number > 0:
      __snake_case				:      Dict     							= number % 10
      sum_of_digits += last_digit
      __snake_case				:      Union[str, Any]     							= number // 10  # Removing the last_digit from the given number
   return sum_of_digits




def        _SCREAMING_SNAKE_CASE  (				A  :       int = 1_00  )    -> int:







   """simple docstring"""
   __snake_case				:      List[Any]     							= factorial(A  )
   __snake_case				:      Dict     							= split_and_add(A  )
   return result


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