






def 					SCREAMING_SNAKE_CASE    (			snake_case_ :							int = 50       ):
	snake_case__			:				Union[str, Any]       =  [1] * (length + 1)

	for row_length in range(3					,  length + 1       ):
		for block_length in range(3					,  row_length + 1       ):
			for block_start in range(row_length - block_length       ):
				ways_number[row_length] += ways_number[
				    row_length - block_start - block_length - 1
				]

			ways_number[row_length] += 1

	return ways_number[length]


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









import argparse

import torch
from torch import nn

from transformers import MBartConfig, MBartForConditionalGeneration







def 					SCREAMING_SNAKE_CASE    (			snake_case_ :							str       ):
	snake_case__			:				Optional[Any]       =  [
	    "encoder.version",
	    "decoder.version",
	    "model.encoder.version",
	    "model.decoder.version",
	    "_float_tensor",
	    "decoder.output_projection.weight",
	]
	for k in ignore_keys:
		state_dict.pop(snake_case_					,  snake_case_       )







def 					SCREAMING_SNAKE_CASE    (			snake_case_ :							int       ):
	snake_case__,						snake_case__			:				Optional[Any]       =  emb.weight.shape
	snake_case__			:				Tuple       =  nn.Linear(snake_case_					,  snake_case_					,  bias=snake_case_       )
	snake_case__			:				Optional[int]       =  emb.weight.data
	return lin_layer







def 					SCREAMING_SNAKE_CASE    (			snake_case_ :							List[Any]					,  snake_case_ :							Optional[Any]="facebook/mbart-large-en-ro"					,  snake_case_ :							Optional[int]=False					,  snake_case_ :							List[Any]=False       ):
	snake_case__			:				Tuple       =  torch.load(snake_case_					,  map_location="cpu"       )["model"]
	remove_ignore_keys_(snake_case_       )
	snake_case__			:				Any       =  state_dict["encoder.embed_tokens.weight"].shape[0]

	snake_case__			:				List[Any]       =  MBartConfig.from_pretrained(snake_case_					,  vocab_size=snake_case_       )
	if mbart_aa and finetuned:
		snake_case__			:				int       =  "relu"

	snake_case__			:				List[str]       =  state_dict["decoder.embed_tokens.weight"]
	snake_case__			:				Tuple       =  MBartForConditionalGeneration(snake_case_       )
	model.model.load_state_dict(snake_case_       )

	if finetuned:
		snake_case__			:				Any       =  make_linear_from_emb(model.model.shared       )

	return model


if __name__ == "__main__":
	__lowerCamelCase :      int										=				argparse.ArgumentParser()
	# Required parameters
	parser.add_argument(
	    """fairseq_path""", type=str, help="""bart.large, bart.large.cnn or a 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.""")
	parser.add_argument(
	    """--hf_config""",
	    default="""facebook/mbart-large-cc25""",
	    type=str,
	    help="""Which huggingface architecture to use: mbart-large""",
	)
	parser.add_argument("""--mbart_50""", action="""store_true""", help="""whether the model is mMART-50 checkpoint""")
	parser.add_argument("""--finetuned""", action="""store_true""", help="""whether the model is a fine-tuned checkpoint""")
	__lowerCamelCase :      Optional[Any]										=				parser.parse_args()
	__lowerCamelCase :      str										=				convert_fairseq_mbart_checkpoint_from_disk(
	    args.fairseq_path, hf_config_path=args.hf_config, finetuned=args.finetuned, mbart_aa=args.mbart_aa
	)
	model.save_pretrained(args.pytorch_dump_folder_path)



