






"""simple docstring"""
import unittest

import numpy as np

from transformers import ElectraConfig, is_flax_available
from transformers.testing_utils import require_flax, slow

from ...test_modeling_flax_common import FlaxModelTesterMixin, ids_tensor, random_attention_mask


if is_flax_available():
      from transformers.models.electra.modeling_flax_electra import (
          FlaxElectraForCausalLM,
          FlaxElectraForMaskedLM,
          FlaxElectraForMultipleChoice,
          FlaxElectraForPreTraining,
          FlaxElectraForQuestionAnswering,
          FlaxElectraForSequenceClassification,
          FlaxElectraForTokenClassification,
          FlaxElectraModel,
      )



class 						a_ (      unittest.TestCase					):







      '''simple docstring'''

      def __init__(self,	lowerCamelCase_,	lowerCamelCase_=1_3,	lowerCamelCase_=7,	lowerCamelCase_=True,	lowerCamelCase_=True,	lowerCamelCase_=True,	lowerCamelCase_=True,	lowerCamelCase_=9_9,	lowerCamelCase_=2_4,	lowerCamelCase_=3_2,	lowerCamelCase_=5,	lowerCamelCase_=4,	lowerCamelCase_=3_7,	lowerCamelCase_="gelu",	lowerCamelCase_=0.1,	lowerCamelCase_=0.1,	lowerCamelCase_=5_1_2,	lowerCamelCase_=1_6,	lowerCamelCase_=2,	lowerCamelCase_=0.02,	lowerCamelCase_=4,	):

       '''simple docstring'''



       lowerCamelCase__	:     Any								=		parent
       lowerCamelCase__	:     Any								=		batch_size
       lowerCamelCase__	:     Tuple								=		seq_length
       lowerCamelCase__	:     Any								=		is_training
       lowerCamelCase__	:     Any								=		use_attention_mask
       lowerCamelCase__	:     Dict								=		use_token_type_ids
       lowerCamelCase__	:     Any								=		use_labels
       lowerCamelCase__	:     Tuple								=		vocab_size
       lowerCamelCase__	:     Optional[Any]								=		hidden_size
       lowerCamelCase__	:     str								=		embedding_size
       lowerCamelCase__	:     Tuple								=		num_hidden_layers
       lowerCamelCase__	:     Tuple								=		num_attention_heads
       lowerCamelCase__	:     Optional[int]								=		intermediate_size
       lowerCamelCase__	:     Optional[Any]								=		hidden_act
       lowerCamelCase__	:     str								=		hidden_dropout_prob
       lowerCamelCase__	:     str								=		attention_probs_dropout_prob
       lowerCamelCase__	:     Union[str, Any]								=		max_position_embeddings
       lowerCamelCase__	:     Dict								=		type_vocab_size
       lowerCamelCase__	:     Union[str, Any]								=		type_sequence_label_size
       lowerCamelCase__	:     str								=		initializer_range
       lowerCamelCase__	:     Dict								=		num_choices




      def      a__				(self   ):

       '''simple docstring'''



       lowerCamelCase__	:     Optional[Any]								=		ids_tensor([self.batch_size, self.seq_length],	self.vocab_size   )

       lowerCamelCase__	:     Any								=		None
       if self.use_attention_mask:
        lowerCamelCase__	:     Optional[Any]								=		random_attention_mask([self.batch_size, self.seq_length]   )

       lowerCamelCase__	:     Optional[Any]								=		None
       if self.use_token_type_ids:
        lowerCamelCase__	:     Optional[int]								=		ids_tensor([self.batch_size, self.seq_length],	self.type_vocab_size   )

       lowerCamelCase__	:     Any								=		ElectraConfig(
           vocab_size=self.vocab_size,	hidden_size=self.hidden_size,	embedding_size=self.embedding_size,	num_hidden_layers=self.num_hidden_layers,	num_attention_heads=self.num_attention_heads,	intermediate_size=self.intermediate_size,	hidden_act=self.hidden_act,	hidden_dropout_prob=self.hidden_dropout_prob,	attention_probs_dropout_prob=self.attention_probs_dropout_prob,	max_position_embeddings=self.max_position_embeddings,	type_vocab_size=self.type_vocab_size,	initializer_range=self.initializer_range,	)

       return config, input_ids, token_type_ids, attention_mask





      def      a__				(self   ):

       '''simple docstring'''



       lowerCamelCase__	:     List[Any]								=		self.prepare_config_and_inputs()
       lowerCamelCase__	:     Optional[Any]								=		config_and_inputs
       lowerCamelCase__	:     Tuple								=		{'input_ids': input_ids, 'token_type_ids': token_type_ids, 'attention_mask': attention_mask}
       return config, inputs_dict



@require_flax
class 						a_ (      snake_case_    ,		unittest.TestCase					):







      '''simple docstring'''

      lowerCamelCase__			:							Tuple					=      True

      lowerCamelCase__			:							Any					=      (
          (
              FlaxElectraModel,
              FlaxElectraForCausalLM,
              FlaxElectraForMaskedLM,
              FlaxElectraForPreTraining,
              FlaxElectraForTokenClassification,
              FlaxElectraForQuestionAnswering,
              FlaxElectraForMultipleChoice,
              FlaxElectraForSequenceClassification,
          )
          if is_flax_available()
          else ()
      )




      def      a__				(self   ):

       '''simple docstring'''



       lowerCamelCase__	:     Tuple								=		FlaxElectraModelTester(self   )





      @slow
      def      a__				(self   ):

       '''simple docstring'''



       for model_class_name in self.all_model_classes:
        if model_class_name == FlaxElectraForMaskedLM:
         lowerCamelCase__	:     Tuple								=		model_class_name.from_pretrained('google/electra-small-generator'   )
        else:
         lowerCamelCase__	:     str								=		model_class_name.from_pretrained('google/electra-small-discriminator'   )
        lowerCamelCase__	:     List[Any]								=		model(np.ones((1, 1)   )   )
        self.assertIsNotNone(_A   )


"""simple docstring"""







def     __UpperCAmelCase							(       UpperCAmelCase_       :							int = 1_00    )				->     int:

	'''simple docstring'''





	__snake_case     :				Any 						=					1
	__snake_case     :				Tuple 						=					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())))





