


import argparse

from transformers import (
    TapasConfig,
    TapasForMaskedLM,
    TapasForQuestionAnswering,
    TapasForSequenceClassification,
    TapasModel,
    TapasTokenizer,
    load_tf_weights_in_tapas,
)
from transformers.utils import logging


logging.set_verbosity_info()







def 							lowerCAmelCase_	(   __lowerCamelCase				,      __lowerCamelCase				,      __lowerCamelCase				,      __lowerCamelCase				,      __lowerCamelCase      ):
							__snake_case						:     List[str]									=  TapasConfig.from_json_file(_A      )
							# set absolute/relative position embeddings parameter
							__snake_case						:     Union[str, Any]									=  reset_position_index_per_cell

							# set remaining parameters of TapasConfig as well as the model based on the task
							if task == "SQA":
														__snake_case						:     Union[str, Any]									=  TapasForQuestionAnswering(config=_A      )
							elif task == "WTQ":
														# run_task_main.py hparams
														__snake_case						:     Optional[Any]									=  4
														__snake_case						:     Union[str, Any]									=  True
														# hparam_utils.py hparams
														__snake_case						:     Union[str, Any]									=  0.6_6_4_6_9_4
														__snake_case						:     Tuple									=  0.2_0_7_9_5_1
														__snake_case						:     Union[str, Any]									=  0.1_2_1_1_9_4
														__snake_case						:     int									=  True
														__snake_case						:     Any									=  True
														__snake_case						:     Tuple									=  False
														__snake_case						:     Optional[Any]									=  0.0_3_5_2_5_1_3

														__snake_case						:     Any									=  TapasForQuestionAnswering(config=_A      )
							elif task == "WIKISQL_SUPERVISED":
														# run_task_main.py hparams
														__snake_case						:     Any									=  4
														__snake_case						:     Tuple									=  False
														# hparam_utils.py hparams
														__snake_case						:     Union[str, Any]									=  3_6.4_5_1_9
														__snake_case						:     List[Any]									=  0.9_0_3_4_2_1
														__snake_case						:     Optional[int]									=  2_2_2.0_8_8
														__snake_case						:     Union[str, Any]									=  True
														__snake_case						:     List[str]									=  True
														__snake_case						:     List[str]									=  True
														__snake_case						:     Union[str, Any]									=  0.7_6_3_1_4_1

														__snake_case						:     List[str]									=  TapasForQuestionAnswering(config=_A      )
							elif task == "TABFACT":
														__snake_case						:     Any									=  TapasForSequenceClassification(config=_A      )
							elif task == "MLM":
														__snake_case						:     Dict									=  TapasForMaskedLM(config=_A      )
							elif task == "INTERMEDIATE_PRETRAINING":
														__snake_case						:     Union[str, Any]									=  TapasModel(config=_A      )
							else:
														raise ValueError(F'Task {task} not supported.'      )

							print(F'Building PyTorch model from configuration: {config}'      )
							# Load weights from tf checkpoint
							load_tf_weights_in_tapas(_A				,      _A				,      _A      )

							# Save pytorch-model (weights and configuration)
							print(F'Save PyTorch model to {pytorch_dump_path}'      )
							model.save_pretrained(_A      )

							# Save tokenizer files
							print(F'Save tokenizer files to {pytorch_dump_path}'      )
							__snake_case						:     int									=  TapasTokenizer(vocab_file=tf_checkpoint_path[:-1_0] + "vocab.txt"				,      model_max_length=5_1_2      )
							tokenizer.save_pretrained(_A      )

							print("Used relative position embeddings:"				,      model.config.reset_position_index_per_cell      )


if __name__ == "__main__":
			_snake_case	:						List[Any]         =							argparse.ArgumentParser()
			# Required parameters
			parser.add_argument(
			    "--task", default="SQA", type=str, help="Model task for which to convert a checkpoint. Defaults to SQA."
			)
			parser.add_argument(
			    "--reset_position_index_per_cell",
			    default=False,
			    action="store_true",
			    help="Whether to use relative position embeddings or not. Defaults to True.",
			)
			parser.add_argument(
			    "--tf_checkpoint_path", default=None, type=str, required=True, help="Path to the TensorFlow checkpoint path."
			)
			parser.add_argument(
			    "--tapas_config_file",
			    default=None,
			    type=str,
			    required=True,
			    help=(
			        "The config json file corresponding to the pre-trained TAPAS model. \n"
			        "This specifies the model architecture."
			    ),
			)
			parser.add_argument(
			    "--pytorch_dump_path", default=None, type=str, required=True, help="Path to the output PyTorch model."
			)
			_snake_case	:						Union[str, Any]         =							parser.parse_args()
			convert_tf_checkpoint_to_pytorch(
			    args.task,
			    args.reset_position_index_per_cell,
			    args.tf_checkpoint_path,
			    args.tapas_config_file,
			    args.pytorch_dump_path,
			)



"""simple docstring"""



def 			_UpperCamelCase						(    _A = 1_0_0_0   )     ->	int:





    """simple docstring"""

    _UpperCAmelCase     ,_UpperCAmelCase        = 1, 1
    _UpperCAmelCase        = 2
    while True:
        _UpperCAmelCase        = 0
        _UpperCAmelCase        = fa + fa
        _UpperCAmelCase     ,_UpperCAmelCase        = fa, f
        index += 1
        for _ in str(_A   ):
            i += 1
        if i == n:
            break
    return index


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