



'''simple docstring'''


from typing import List, Optional, Union

from ...configuration_utils import PretrainedConfig
from ...utils import logging


lowercase							       =			logging.get_logger(__name__)

lowercase							       =			{
    '''huggingface/time-series-transformer-tourism-monthly''': (
        '''https://huggingface.co/huggingface/time-series-transformer-tourism-monthly/resolve/main/config.json'''
    ),
    # See all TimeSeriesTransformer models at https://huggingface.co/models?filter=time_series_transformer
}







class 	UpperCAmelCase	(		__a):


 '''simple docstring'''




 __magic_name__					: Dict  =      "time_series_transformer"
 __magic_name__					: Any  =      {
     "hidden_size": "d_model",
     "num_attention_heads": "encoder_attention_heads",
     "num_hidden_layers": "encoder_layers",
 }




 def __init__(   self							,  lowerCAmelCase_ = None							,  lowerCAmelCase_ = None							,  lowerCAmelCase_ = "student_t"							,  lowerCAmelCase_ = "nll"							,  lowerCAmelCase_ = 1							,  lowerCAmelCase_ = [1, 2, 3, 4, 5, 6, 7]							,  lowerCAmelCase_ = "mean"							,  lowerCAmelCase_ = 0							,  lowerCAmelCase_ = 0							,  lowerCAmelCase_ = 0							,  lowerCAmelCase_ = 0							,  lowerCAmelCase_ = None							,  lowerCAmelCase_ = None							,  lowerCAmelCase_ = 3_2							,  lowerCAmelCase_ = 3_2							,  lowerCAmelCase_ = 2							,  lowerCAmelCase_ = 2							,  lowerCAmelCase_ = 2							,  lowerCAmelCase_ = 2							,  lowerCAmelCase_ = True							,  lowerCAmelCase_ = "gelu"							,  lowerCAmelCase_ = 6_4							,  lowerCAmelCase_ = 0.1							,  lowerCAmelCase_ = 0.1							,  lowerCAmelCase_ = 0.1							,  lowerCAmelCase_ = 0.1							,  lowerCAmelCase_ = 0.1							,  lowerCAmelCase_ = 1_0_0							,  lowerCAmelCase_ = 0.0_2							,  lowerCAmelCase_=True							,  **lowerCAmelCase_							,  ) ->      str:



      """simple docstring"""







      a_       		=prediction_length
      a_       		=context_length or prediction_length
      a_       		=distribution_output
      a_       		=loss
      a_       		=input_size
      a_       		=num_time_features
      a_       		=lags_sequence
      a_       		=scaling
      a_       		=num_dynamic_real_features
      a_       		=num_static_real_features
      a_       		=num_static_categorical_features
      if cardinality and num_static_categorical_features > 0:
           if len(lowerCAmelCase_) != num_static_categorical_features:
                raise ValueError(
                    "The cardinality should be a list of the same length as `num_static_categorical_features`")
           a_       		=cardinality
      else:
           a_       		=[0]
      if embedding_dimension and num_static_categorical_features > 0:
           if len(lowerCAmelCase_) != num_static_categorical_features:
                raise ValueError(
                    "The embedding dimension should be a list of the same length as `num_static_categorical_features`")
           a_       		=embedding_dimension
      else:
           a_       		=[min(5_0							,  (cat + 1) // 2) for cat in self.cardinality]
      a_       		=num_parallel_samples

      # Transformer architecture configuration
      a_       		=input_size * len(lowerCAmelCase_) + self._number_of_features
      a_       		=d_model
      a_       		=encoder_attention_heads
      a_       		=decoder_attention_heads
      a_       		=encoder_ffn_dim
      a_       		=decoder_ffn_dim
      a_       		=encoder_layers
      a_       		=decoder_layers

      a_       		=dropout
      a_       		=attention_dropout
      a_       		=activation_dropout
      a_       		=encoder_layerdrop
      a_       		=decoder_layerdrop

      a_       		=activation_function
      a_       		=init_std

      a_       		=use_cache

      super().__init__(is_encoder_decoder=lowerCAmelCase_							,  **lowerCAmelCase_)




 @property
 def       lowercase_  (   self) ->      int:



      """simple docstring"""







      return (
          sum(self.embedding_dimension)
          + self.num_dynamic_real_features
          + self.num_time_features
          + self.num_static_real_features
          + self.input_size * 2  # the log1p(abs(loc)) and log(scale) features
      )







'''simple docstring'''


from collections.abc import Generator






def  UpperCAmelCase_       (		):


     '''simple docstring'''







     a_		,						a_       		=0, 1
     while True:
          a_		,						a_       		=b, a + b
          yield b






def  UpperCAmelCase_       (		lowercase__ = 1_0_0_0       ):


     '''simple docstring'''







     a_       		=1
     a_       		=fibonacci_generator()
     while len(str(next(lowercase__       )       )       ) < n:
          answer += 1
     return answer + 1


if __name__ == "__main__":
  print(solution(int(str(input()).strip())))


