




"""simple docstring"""

from collections.abc import Generator

def 		lowercase_      (		):




	"""simple docstring"""






	A_   , A_  :				List[str]	   =		0, 1
	while True:
		A_   , A_  :				Tuple	   =		b, a + b
		yield b

def 		lowercase_      (		_UpperCAmelCase = 1000	):




	"""simple docstring"""






	A_  :				Optional[Any]	   =		1
	A_  :				List[Any]	   =		fibonacci_generator()
	while len(str(next(_UpperCAmelCase	)	)	) < n:
		answer += 1
	return answer + 1


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












"""simple docstring"""

import argparse
from argparse import Namespace

import torch
from torch import nn

from transformers import XGLMConfig, XGLMForCausalLM

def 		lowercase_      (		_UpperCAmelCase	):




	"""simple docstring"""






	A_  :				Optional[Any]	   =		[
	    '''decoder.version''',
	    '''decoder.output_projection.weight''',
	    '''_float_tensor''',
	    '''decoder.embed_positions._float_tensor''',
	]
	for k in ignore_keys:
		state_dict.pop(_UpperCAmelCase  ,      _UpperCAmelCase	)

def 		lowercase_      (		_UpperCAmelCase	):




	"""simple docstring"""






	A_   , A_  :				List[Any]	   =		emb.weight.shape
	A_  :				List[Any]	   =		nn.Linear(_UpperCAmelCase  ,      _UpperCAmelCase  ,      bias=_UpperCAmelCase	)
	A_  :				Any	   =		emb.weight.data
	return lin_layer

def 		lowercase_      (		_UpperCAmelCase	):




	"""simple docstring"""






	A_  :				int	   =		torch.load(_UpperCAmelCase  ,      map_location='''cpu'''	)
	A_  :				Any	   =		Namespace(**checkpoint['''cfg''']['''model''']	)
	A_  :				List[str]	   =		checkpoint['''model''']
	remove_ignore_keys_(_UpperCAmelCase	)
	A_  :				Union[str, Any]	   =		state_dict['''decoder.embed_tokens.weight'''].shape[0]

	A_  :				List[str]	   =		{key.replace('''decoder'''  ,      '''model'''	): val for key, val in state_dict.items()}

	A_  :				int	   =		XGLMConfig(
	    vocab_size=_UpperCAmelCase  ,      max_position_embeddings=args.max_target_positions  ,      num_layers=args.decoder_layers  ,      attention_heads=args.decoder_attention_heads  ,      ffn_dim=args.decoder_ffn_embed_dim  ,      d_model=args.decoder_embed_dim  ,      layerdrop=args.decoder_layerdrop  ,      dropout=args.dropout  ,      attention_dropout=args.attention_dropout  ,      activation_dropout=args.activation_dropout  ,      activation_function='''gelu'''  ,      scale_embedding=not args.no_scale_embedding  ,      tie_word_embeddings=args.share_decoder_input_output_embed  ,      )

	A_  :				Any	   =		XGLMForCausalLM(_UpperCAmelCase	)
	A_  :				int	   =		model.load_state_dict(_UpperCAmelCase  ,      strict=_UpperCAmelCase	)
	print(_UpperCAmelCase	)
	A_  :				int	   =		make_linear_from_emb(model.model.embed_tokens	)

	return model


if __name__ == "__main__":
		_lowerCamelCase  :			Any        =       argparse.ArgumentParser()
		# Required parameters
		parser.add_argument('fairseq_path', type=str, help='path to a model.pt on local filesystem.')
		parser.add_argument('pytorch_dump_folder_path', default=None, type=str, help='Path to the output PyTorch model.')
		_lowerCamelCase  :			int        =       parser.parse_args()
		_lowerCamelCase  :			Optional[Any]        =       convert_fairseq_xglm_checkpoint_from_disk(args.fairseq_path)
		model.save_pretrained(args.pytorch_dump_folder_path)





