





import os
from typing import Dict, List, Union

import tensorflow as tf
from keras_nlp.tokenizers import BytePairTokenizer
from tensorflow_text import pad_model_inputs

from .tokenization_gpta import GPTaTokenizer





class lowerCamelCase						(tf.keras.layers.Layer					):







  def __init__(		self     ,     lowercase__     ,     lowercase__     ,     lowercase__ = None     ,     lowercase__ = None		)		->						Any:






        """simple docstring"""





        super().__init__()
        _snake_case		:	Tuple					     =     pad_token_id
        _snake_case		:	int					     =     max_length
        _snake_case		:	List[Any]					     =     vocab
        _snake_case		:	Tuple					     =     merges
        _snake_case		:	int					     =     BytePairTokenizer(UpperCamelCase_     ,     UpperCamelCase_     ,     sequence_length=UpperCamelCase_		)







  @classmethod
  def 				UpperCAmelCase_				(		cls     ,     lowercase__     ,     *lowercase__     ,     **lowercase__		)		->						List[str]:






        """simple docstring"""





        _snake_case		:	Union[str, Any]					     =     [' '.join(UpperCamelCase_		) for m in tokenizer.bpe_ranks.keys()]
        _snake_case		:	int					     =     tokenizer.get_vocab()
        return cls(UpperCamelCase_     ,     UpperCamelCase_     ,     *UpperCamelCase_     ,     **UpperCamelCase_		)







  @classmethod
  def 				UpperCAmelCase_				(		cls     ,     lowercase__     ,     *lowercase__     ,     **lowercase__		)		->						Dict:






        """simple docstring"""





        _snake_case		:	int					     =     GPTaTokenizer.from_pretrained(UpperCamelCase_     ,     *UpperCamelCase_     ,     **UpperCamelCase_		)
        return cls.from_tokenizer(UpperCamelCase_     ,     *UpperCamelCase_     ,     **UpperCamelCase_		)







  @classmethod
  def 				UpperCAmelCase_				(		cls     ,     lowercase__		)		->						List[str]:






        """simple docstring"""





        return cls(**UpperCamelCase_		)







  def 				UpperCAmelCase_				(		self		)		->						Optional[int]:






        """simple docstring"""





        return {
            "vocab": self.vocab,
            "merges": self.merges,
            "max_length": self.max_length,
            "pad_token_id": self.pad_token_id,
        }







  def 				UpperCAmelCase_				(		self     ,     lowercase__     ,     lowercase__ = None		)		->						List[Any]:






        """simple docstring"""





        _snake_case		:	Any					     =     self.tf_tokenizer(UpperCamelCase_		)
        _snake_case		:	Optional[Any]					     =     tf.ones_like(UpperCamelCase_		)

        if self.pad_token_id is not None:
              # pad the tokens up to max length
              _snake_case		:	Optional[int]					     =     max_length if max_length is not None else self.max_length

              if max_length is not None:
                    _snake_case		:	List[Any]					     =     pad_model_inputs(
                        UpperCamelCase_     ,     max_seq_length=UpperCamelCase_     ,     pad_value=self.pad_token_id		)

        return {"attention_mask": attention_mask, "input_ids": input_ids}









'''simple docstring'''

from collections.abc import Generator




def    _a    (							):





      """simple docstring"""



      _snake_case     ,							_snake_case		:	Union[str, Any]					     =     0, 1
      while True:
            _snake_case     ,							_snake_case		:	List[str]					     =     b, a + b
            yield b




def    _a    (							lowerCAmelCase_ = 1_000	):





      """simple docstring"""



      _snake_case		:	List[str]					     =     1
      _snake_case		:	Dict					     =     fibonacci_generator()
      while len(str(next(lowerCAmelCase_	)	)	) < n:
            answer += 1
      return answer + 1


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


