





import os





def       _UpperCamelCase       () ->    Optional[int]:






							"""simple docstring"""





							UpperCamelCase__			       =     os.path.dirname(os.path.realpath(__a    )    )
							UpperCamelCase__			       =     os.path.join(__a				,     """triangle.txt"""    )

							with open(__a    ) as f:
														UpperCamelCase__			       =     f.readlines()

							UpperCamelCase__			       =     []
							for line in triangle:
														UpperCamelCase__			       =     []
														for number in line.strip().split(""" """    ):
																					numbers_from_line.append(int(__a    )    )
														a.append(__a    )

							for i in range(1				,     len(__a    )    ):
														for j in range(len(a[i]    )    ):
																					UpperCamelCase__			       =     a[i - 1][j] if j != len(a[i - 1]    ) else 0
																					UpperCamelCase__			       =     a[i - 1][j - 1] if j > 0 else 0
																					a[i][j] += max(__a				,     __a    )
							return max(a[-1]    )


if __name__ == "__main__":
					print(solution())











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


UpperCamelCase__     =	logging.get_logger(__name__)

UpperCamelCase__     =	{
    "facebook/s2t-wav2vec2-large-en-de": (
        "https://huggingface.co/facebook/s2t-wav2vec2-large-en-de/resolve/main/config.json"
    ),
    # See all Speech2Text models at https://huggingface.co/models?filter=speech2text2
}

class     __SCREAMING_SNAKE_CASE   (       _a    ):
							snake_case       : Dict         =    """speech_to_text_2"""
							snake_case       : List[Any]         =    ["""past_key_values"""]
							snake_case       : List[str]         =    {"""num_attention_heads""": """decoder_attention_heads""", """hidden_size""": """d_model"""}






							def __init__(  self					,	__lowerCAmelCase=10000					,	__lowerCAmelCase=6					,	__lowerCAmelCase=2048					,	__lowerCAmelCase=4					,	__lowerCAmelCase=0.0					,	__lowerCAmelCase=True					,	__lowerCAmelCase="relu"					,	__lowerCAmelCase=256					,	__lowerCAmelCase=0.1					,	__lowerCAmelCase=0.0					,	__lowerCAmelCase=0.0					,	__lowerCAmelCase=0.02					,	__lowerCAmelCase=2					,	__lowerCAmelCase=True					,	__lowerCAmelCase=1					,	__lowerCAmelCase=0					,	__lowerCAmelCase=2					,	__lowerCAmelCase=1024					,	**__lowerCAmelCase					,	):
														UpperCamelCase__			       =     vocab_size
														UpperCamelCase__			       =     d_model
														UpperCamelCase__			       =     decoder_ffn_dim
														UpperCamelCase__			       =     decoder_layers
														UpperCamelCase__			       =     decoder_attention_heads
														UpperCamelCase__			       =     dropout
														UpperCamelCase__			       =     attention_dropout
														UpperCamelCase__			       =     activation_dropout
														UpperCamelCase__			       =     activation_function
														UpperCamelCase__			       =     init_std
														UpperCamelCase__			       =     decoder_layerdrop
														UpperCamelCase__			       =     use_cache
														UpperCamelCase__			       =     decoder_layers
														UpperCamelCase__			       =     scale_embedding  # scale factor will be sqrt(d_model) if True
														UpperCamelCase__			       =     max_target_positions

														super().__init__(
														    pad_token_id=__lowerCAmelCase					,	bos_token_id=__lowerCAmelCase					,	eos_token_id=__lowerCAmelCase					,	decoder_start_token_id=__lowerCAmelCase					,	**__lowerCAmelCase					,	)




