


"""simple docstring"""


from collections import OrderedDict
from typing import TYPE_CHECKING, Any, Mapping, Optional

from packaging import version

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig
from ...onnx.utils import compute_effective_axis_dimension
from ...utils import logging


if TYPE_CHECKING:
   from ...processing_utils import ProcessorMixin
   from ...utils import TensorType


_snake_case          =							logging.get_logger(__name__)

_snake_case          =							{
    'microsoft/layoutlmv3-base': 'https://huggingface.co/microsoft/layoutlmv3-base/resolve/main/config.json',
}



class   _a      (      UpperCamelCase_ ):
    a_    :				List[Any]             =    'layoutlmv3'
    def __init__( self							:					Optional[int]							,					SCREAMING_SNAKE_CASE__							:					Union[str, Any]=5_02_65							,					SCREAMING_SNAKE_CASE__							:					List[Any]=7_68							,					SCREAMING_SNAKE_CASE__							:					Union[str, Any]=12							,					SCREAMING_SNAKE_CASE__							:					Union[str, Any]=12							,					SCREAMING_SNAKE_CASE__							:					Tuple=30_72							,					SCREAMING_SNAKE_CASE__							:					List[Any]="gelu"							,					SCREAMING_SNAKE_CASE__							:					List[Any]=0.1							,					SCREAMING_SNAKE_CASE__							:					List[str]=0.1							,					SCREAMING_SNAKE_CASE__							:					Any=5_12							,					SCREAMING_SNAKE_CASE__							:					List[Any]=2							,					SCREAMING_SNAKE_CASE__							:					List[Any]=0.02							,					SCREAMING_SNAKE_CASE__							:					Optional[Any]=1e-5							,					SCREAMING_SNAKE_CASE__							:					List[str]=1							,					SCREAMING_SNAKE_CASE__							:					int=0							,					SCREAMING_SNAKE_CASE__							:					str=2							,					SCREAMING_SNAKE_CASE__							:					List[str]=10_24							,					SCREAMING_SNAKE_CASE__							:					str=1_28							,					SCREAMING_SNAKE_CASE__							:					str=1_28							,					SCREAMING_SNAKE_CASE__							:					Tuple=True							,					SCREAMING_SNAKE_CASE__							:					Optional[int]=32							,					SCREAMING_SNAKE_CASE__							:					Any=1_28							,					SCREAMING_SNAKE_CASE__							:					Optional[Any]=64							,					SCREAMING_SNAKE_CASE__							:					Dict=2_56							,					SCREAMING_SNAKE_CASE__							:					List[Any]=True							,					SCREAMING_SNAKE_CASE__							:					str=True							,					SCREAMING_SNAKE_CASE__							:					Dict=True							,					SCREAMING_SNAKE_CASE__							:					Dict=2_24							,					SCREAMING_SNAKE_CASE__							:					Optional[Any]=3							,					SCREAMING_SNAKE_CASE__							:					Any=16							,					SCREAMING_SNAKE_CASE__							:					Any=None							,					**SCREAMING_SNAKE_CASE__							:					Optional[Any]							,					):
          super().__init__(
              vocab_size=UpperCamelCase__							,					hidden_size=UpperCamelCase__							,					num_hidden_layers=UpperCamelCase__							,					num_attention_heads=UpperCamelCase__							,					intermediate_size=UpperCamelCase__							,					hidden_act=UpperCamelCase__							,					hidden_dropout_prob=UpperCamelCase__							,					attention_probs_dropout_prob=UpperCamelCase__							,					max_position_embeddings=UpperCamelCase__							,					type_vocab_size=UpperCamelCase__							,					initializer_range=UpperCamelCase__							,					layer_norm_eps=UpperCamelCase__							,					pad_token_id=UpperCamelCase__							,					bos_token_id=UpperCamelCase__							,					eos_token_id=UpperCamelCase__							,					**UpperCamelCase__							,					)
          lowerCamelCase__           =		max_ad_position_embeddings
          lowerCamelCase__           =		coordinate_size
          lowerCamelCase__           =		shape_size
          lowerCamelCase__           =		has_relative_attention_bias
          lowerCamelCase__           =		rel_pos_bins
          lowerCamelCase__           =		max_rel_pos
          lowerCamelCase__           =		has_spatial_attention_bias
          lowerCamelCase__           =		rel_ad_pos_bins
          lowerCamelCase__           =		max_rel_ad_pos
          lowerCamelCase__           =		text_embed
          lowerCamelCase__           =		visual_embed
          lowerCamelCase__           =		input_size
          lowerCamelCase__           =		num_channels
          lowerCamelCase__           =		patch_size
          lowerCamelCase__           =		classifier_dropout





class   _a      (      UpperCamelCase_ ):
    a_    :				str             =    version.parse('1.12' )
    @property
    def      _UpperCamelCase       ( self							:					str				):





          if self.task in ["question-answering", "sequence-classification"]:
                return OrderedDict(
                    [
                        ('input_ids', {0: 'batch', 1: 'sequence'}),
                        ('attention_mask', {0: 'batch', 1: 'sequence'}),
                        ('bbox', {0: 'batch', 1: 'sequence'}),
                        ('pixel_values', {0: 'batch', 1: 'num_channels', 2: 'height', 3: 'width'}),
                    ]				)
          else:
                return OrderedDict(
                    [
                        ('input_ids', {0: 'batch', 1: 'sequence'}),
                        ('bbox', {0: 'batch', 1: 'sequence'}),
                        ('attention_mask', {0: 'batch', 1: 'sequence'}),
                        ('pixel_values', {0: 'batch', 1: 'num_channels'}),
                    ]				)
    @property
    def      _UpperCamelCase       ( self							:					int				):
          return 1e-5
    @property
    def      _UpperCamelCase       ( self							:					Union[str, Any]				):
          return 12


    def      _UpperCamelCase       ( self							:					Optional[Any]							,					SCREAMING_SNAKE_CASE__							:					"ProcessorMixin"							,					SCREAMING_SNAKE_CASE__							:					int = -1							,					SCREAMING_SNAKE_CASE__							:					int = -1							,					SCREAMING_SNAKE_CASE__							:					bool = False							,					SCREAMING_SNAKE_CASE__							:					Optional["TensorType"] = None							,					SCREAMING_SNAKE_CASE__							:					int = 3							,					SCREAMING_SNAKE_CASE__							:					int = 40							,					SCREAMING_SNAKE_CASE__							:					int = 40							,					):
          setattr(processor.image_processor							,					'apply_ocr'							,					UpperCamelCase__				)

          # If dynamic axis (-1) we forward with a fixed dimension of 2 samples to avoid optimizations made by ONNX
          lowerCamelCase__           =		compute_effective_axis_dimension(
              UpperCamelCase__							,					fixed_dimension=OnnxConfig.default_fixed_batch							,					num_token_to_add=0				)
          # If dynamic axis (-1) we forward with a fixed dimension of 8 tokens to avoid optimizations made by ONNX
          lowerCamelCase__           =		processor.tokenizer.num_special_tokens_to_add(UpperCamelCase__				)
          lowerCamelCase__           =		compute_effective_axis_dimension(
              UpperCamelCase__							,					fixed_dimension=OnnxConfig.default_fixed_sequence							,					num_token_to_add=UpperCamelCase__				)
          # Generate dummy inputs according to compute batch and sequence
          lowerCamelCase__           =		[[''' '''.join([processor.tokenizer.unk_token]				) * seq_length]] * batch_size

          # Generate dummy bounding boxes
          lowerCamelCase__           =		[[[48, 84, 73, 1_28]]] * batch_size

          # If dynamic axis (-1) we forward with a fixed dimension of 2 samples to avoid optimizations made by ONNX
          # batch_size = compute_effective_axis_dimension(batch_size, fixed_dimension=OnnxConfig.default_fixed_batch)
          lowerCamelCase__           =		self._generate_dummy_images(UpperCamelCase__							,					UpperCamelCase__							,					UpperCamelCase__							,					UpperCamelCase__				)

          lowerCamelCase__           =		dict(
              processor(
                  UpperCamelCase__							,					text=UpperCamelCase__							,					boxes=UpperCamelCase__							,					return_tensors=UpperCamelCase__							,					)				)

          return inputs







"""simple docstring"""


def   snake_case						(				_a:     int							)->		int:
      '''simple docstring'''


      lowerCamelCase__           =		1
      for i in range(1		,   num + 1							):
            fact *= i
      return fact



def   snake_case						(				_a:     int							)->		int:
      '''simple docstring'''


      lowerCamelCase__           =		0
      while number > 0:
            lowerCamelCase__           =		number % 10
            sum_of_digits += last_digit
            lowerCamelCase__           =		number // 10  # Removing the last_digit from the given number
      return sum_of_digits



def   snake_case						(				_a:     int = 100							)->		int:
      '''simple docstring'''


      lowerCamelCase__           =		factorial(_a							)
      lowerCamelCase__           =		split_and_add(_a							)
      return result


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



