



import warnings
from typing import List

import numpy as np

from ...processing_utils import ProcessorMixin
from ...tokenization_utils_base import BatchEncoding
from ...utils import is_flax_available, is_tf_available, is_torch_available



class      _UpperCAmelCase      (							A__  ):
     UpperCamelCase__		     =					['''image_processor''', '''tokenizer''']
     UpperCamelCase__		     =					'''OwlViTImageProcessor'''
     UpperCamelCase__		     =					('''CLIPTokenizer''', '''CLIPTokenizerFast''')




     def __init__(					self			,    a__=None			,    a__=None			,    **a__):
         A__					=       None
         if "feature_extractor" in kwargs:
             warnings.warn(
                 '''The `feature_extractor` argument is deprecated and will be removed in v5, use `image_processor`'''
                 ''' instead.'''			,    a__			,    )
             A__					=       kwargs.pop('''feature_extractor''')

         A__					=       image_processor if image_processor is not None else feature_extractor
         if image_processor is None:
             raise ValueError('''You need to specify an `image_processor`.''')
         if tokenizer is None:
             raise ValueError('''You need to specify a `tokenizer`.''')

         super().__init__(a__			,    a__)




     def __call__(					self			,    a__=None			,    a__=None			,    a__=None			,    a__="max_length"			,    a__="np"			,    **a__):

         if text is None and query_images is None and images is None:
             raise ValueError(
                 '''You have to specify at least one text or query image or image. All three cannot be none.''')

         if text is not None:
             if isinstance(a__			,    a__) or (isinstance(a__			,    a__) and not isinstance(text[0]			,    a__)):
                 A__					=       [self.tokenizer(a__			,    padding=a__			,    return_tensors=a__			,    **a__)]

             elif isinstance(a__			,    a__) and isinstance(text[0]			,    a__):
                 A__					=       []

                 # Maximum number of queries across batch
                 A__					=       max([len(a__) for t in text])

                 # Pad all batch samples to max number of text queries
                 for t in text:
                     if len(a__) != max_num_queries:
                         A__					=       t + [''' '''] * (max_num_queries - len(a__))

                     A__					=       self.tokenizer(a__			,    padding=a__			,    return_tensors=a__			,    **a__)
                     encodings.append(a__)
             else:
                 raise TypeError('''Input text should be a string, a list of strings or a nested list of strings''')

             if return_tensors == "np":
                 A__					=       np.concatenate([encoding['''input_ids'''] for encoding in encodings]			,    axis=0)
                 A__					=       np.concatenate([encoding['''attention_mask'''] for encoding in encodings]			,    axis=0)

             elif return_tensors == "jax" and is_flax_available():
                 import jax.numpy as jnp

                 A__					=       jnp.concatenate([encoding['''input_ids'''] for encoding in encodings]			,    axis=0)
                 A__					=       jnp.concatenate([encoding['''attention_mask'''] for encoding in encodings]			,    axis=0)

             elif return_tensors == "pt" and is_torch_available():
                 import torch

                 A__					=       torch.cat([encoding['''input_ids'''] for encoding in encodings]			,    dim=0)
                 A__					=       torch.cat([encoding['''attention_mask'''] for encoding in encodings]			,    dim=0)

             elif return_tensors == "tf" and is_tf_available():
                 import tensorflow as tf

                 A__					=       tf.stack([encoding['''input_ids'''] for encoding in encodings]			,    axis=0)
                 A__					=       tf.stack([encoding['''attention_mask'''] for encoding in encodings]			,    axis=0)

             else:
                 raise ValueError('''Target return tensor type could not be returned''')

             A__					=       BatchEncoding()
             A__					=       input_ids
             A__					=       attention_mask

         if query_images is not None:
             A__					=       BatchEncoding()
             A__					=       self.image_processor(
                 a__			,    return_tensors=a__			,    **a__).pixel_values
             A__					=       query_pixel_values

         if images is not None:
             A__					=       self.image_processor(a__			,    return_tensors=a__			,    **a__)

         if text is not None and images is not None:
             A__					=       image_features.pixel_values
             return encoding
         elif query_images is not None and images is not None:
             A__					=       image_features.pixel_values
             return encoding
         elif text is not None or query_images is not None:
             return encoding
         else:
             return BatchEncoding(data=dict(**a__)			,    tensor_type=a__)




     def 		snake_case_		(					self			,    *a__			,    **a__):
         return self.image_processor.post_process(*a__			,    **a__)




     def 		snake_case_		(					self			,    *a__			,    **a__):
         return self.image_processor.post_process_object_detection(*a__			,    **a__)




     def 		snake_case_		(					self			,    *a__			,    **a__):
         return self.image_processor.post_process_image_guided_detection(*a__			,    **a__)




     def 		snake_case_		(					self			,    *a__			,    **a__):
         return self.tokenizer.batch_decode(*a__			,    **a__)




     def 		snake_case_		(					self			,    *a__			,    **a__):
         return self.tokenizer.decode(*a__			,    **a__)




     @property
     def 		snake_case_		(					self):
         warnings.warn(
             '''`feature_extractor_class` is deprecated and will be removed in v5. Use `image_processor_class` instead.'''			,    a__			,    )
         return self.image_processor_class




     @property
     def 		snake_case_		(					self):
         warnings.warn(
             '''`feature_extractor` is deprecated and will be removed in v5. Use `image_processor` instead.'''			,    a__			,    )
         return self.image_processor





def 		lowerCAmelCase__     (       UpperCamelCase_					:							int						)->	int:
    A__					=       1
    for i in range(1			,							num + 1						):
        fact *= i
    return fact



def 		lowerCAmelCase__     (       UpperCamelCase_					:							int						)->	int:
    A__					=       0
    while number > 0:
        A__					=       number % 1_0
        sum_of_digits += last_digit
        A__					=       number // 1_0  # Removing the last_digit from the given number
    return sum_of_digits



def 		lowerCAmelCase__     (       UpperCamelCase_					:							int = 1_0_0						)->	int:
    A__					=       factorial(UpperCamelCase_						)
    A__					=       split_and_add(UpperCamelCase_						)
    return result


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