




_lowerCAmelCase  :				int						=				{
    "0": 1,
    "1": 1,
    "2": 2,
    "3": 6,
    "4": 2_4,
    "5": 1_2_0,
    "6": 7_2_0,
    "7": 5_0_4_0,
    "8": 4_0_3_2_0,
    "9": 3_6_2_8_8_0,
}

_lowerCAmelCase  :				int						=				{1_4_5: 1_4_5}

_lowerCAmelCase  :				Optional[Any]						=				{
    1_4_5: 0,
    1_6_9: 3,
    3_6_3_0_1: 3,
    1_4_5_4: 3,
    8_7_1: 2,
    4_5_3_6_1: 2,
    8_7_2: 2,
}



def   lowerCAmelCase						(						_lowerCAmelCase							:				int		):




 """simple docstring"""







 if n in CACHE_SUM_DIGIT_FACTORIALS:
  return CACHE_SUM_DIGIT_FACTORIALS[n]
 UpperCAmelCase__								=  sum(DIGIT_FACTORIALS[let] for let in str(_lowerCAmelCase		)		)
 UpperCAmelCase__								=  ret
 return ret



def   lowerCAmelCase						(						_lowerCAmelCase							:				int  ,							_lowerCAmelCase							:				set | None = None		):




 """simple docstring"""







 UpperCAmelCase__								=  previous or set()
 if n in CHAIN_LENGTH_CACHE:
  return CHAIN_LENGTH_CACHE[n]
 UpperCAmelCase__								=  sum_digit_factorials(_lowerCAmelCase		)
 if next_number in previous:
  UpperCAmelCase__								=  0
  return 0
 else:
  previous.add(_lowerCAmelCase		)
  UpperCAmelCase__								=  1 + chain_length(_lowerCAmelCase  ,							_lowerCAmelCase		)
  UpperCAmelCase__								=  ret
  return ret



def   lowerCAmelCase						(						_lowerCAmelCase							:				int = 60  ,							_lowerCAmelCase							:				int = 100_0000		):




 """simple docstring"""







 return sum(1 for i in range(1  ,							_lowerCAmelCase		) if chain_length(_lowerCAmelCase		) == num_terms		)


if __name__ == "__main__":
  print(F'''{solution() = }''')











from collections import OrderedDict
from typing import Mapping

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


_lowerCAmelCase  :				Dict						=				logging.get_logger(__name__)

_lowerCAmelCase  :				Optional[int]						=				{
    "google/rembert": "https://huggingface.co/google/rembert/resolve/main/config.json",
    # See all RemBERT models at https://huggingface.co/models?filter=rembert
}
class      _UpperCamelCase (			lowerCAmelCase						):
      UpperCAmelCase_            =						"""rembert"""
      def __init__(     self				:Union[str, Any]	, lowerCamelCase				:Union[str, Any]=25_0300	, lowerCamelCase				:Optional[Any]=1152	, lowerCamelCase				:Optional[int]=32	, lowerCamelCase				:Union[str, Any]=18	, lowerCamelCase				:str=256	, lowerCamelCase				:Any=1664	, lowerCamelCase				:Any=4608	, lowerCamelCase				:List[str]="gelu"	, lowerCamelCase				:Optional[Any]=0.0	, lowerCamelCase				:Optional[int]=0.0	, lowerCamelCase				:Dict=0.1	, lowerCamelCase				:List[str]=512	, lowerCamelCase				:int=2	, lowerCamelCase				:str=0.02	, lowerCamelCase				:Optional[int]=1e-12	, lowerCamelCase				:List[Any]=True	, lowerCamelCase				:Optional[Any]=0	, lowerCamelCase				:Optional[Any]=312	, lowerCamelCase				:int=313	, **lowerCamelCase				:Dict	, )       ->     Any:
       super().__init__(pad_token_id=lowerCamelCase	, bos_token_id=lowerCamelCase	, eos_token_id=lowerCamelCase	, **lowerCamelCase )

       UpperCAmelCase__								=  vocab_size
       UpperCAmelCase__								=  input_embedding_size
       UpperCAmelCase__								=  output_embedding_size
       UpperCAmelCase__								=  max_position_embeddings
       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__								=  classifier_dropout_prob
       UpperCAmelCase__								=  initializer_range
       UpperCAmelCase__								=  type_vocab_size
       UpperCAmelCase__								=  layer_norm_eps
       UpperCAmelCase__								=  use_cache
       UpperCAmelCase__								=  False



class      _UpperCamelCase (			lowerCAmelCase						):
      @property
      def 		UpperCAmelCase_  (     self				:List[Any] )       ->     Mapping[str, Mapping[int, str]]:
       if self.task == "multiple-choice":
        UpperCAmelCase__								=  {0: "batch", 1: "choice", 2: "sequence"}
       else:
        UpperCAmelCase__								=  {0: "batch", 1: "sequence"}
       return OrderedDict(
           [
               ("input_ids", dynamic_axis),
               ("attention_mask", dynamic_axis),
               ("token_type_ids", dynamic_axis),
           ] )







      @property
      def 		UpperCAmelCase_  (     self				:Union[str, Any] )       ->     float:
       return 1e-4





