





"""simple docstring"""




from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


_a									=				{"""configuration_qdqbert""": ["""QDQBERT_PRETRAINED_CONFIG_ARCHIVE_MAP""", """QDQBertConfig"""]}

try:
			if not is_torch_available():
						raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
			pass
else:
			_a									=				[
			    """QDQBERT_PRETRAINED_MODEL_ARCHIVE_LIST""",
			    """QDQBertForMaskedLM""",
			    """QDQBertForMultipleChoice""",
			    """QDQBertForNextSentencePrediction""",
			    """QDQBertForQuestionAnswering""",
			    """QDQBertForSequenceClassification""",
			    """QDQBertForTokenClassification""",
			    """QDQBertLayer""",
			    """QDQBertLMHeadModel""",
			    """QDQBertModel""",
			    """QDQBertPreTrainedModel""",
			    """load_tf_weights_in_qdqbert""",
			]


if TYPE_CHECKING:
			from .configuration_qdqbert import QDQBERT_PRETRAINED_CONFIG_ARCHIVE_MAP, QDQBertConfig

			try:
						if not is_torch_available():
									raise OptionalDependencyNotAvailable()
			except OptionalDependencyNotAvailable:
						pass
			else:
						from .modeling_qdqbert import (
						    QDQBERT_PRETRAINED_MODEL_ARCHIVE_LIST,
						    QDQBertForMaskedLM,
						    QDQBertForMultipleChoice,
						    QDQBertForNextSentencePrediction,
						    QDQBertForQuestionAnswering,
						    QDQBertForSequenceClassification,
						    QDQBertForTokenClassification,
						    QDQBertLayer,
						    QDQBertLMHeadModel,
						    QDQBertModel,
						    QDQBertPreTrainedModel,
						    load_tf_weights_in_qdqbert,
						)


else:
			import sys

			_a									=				_LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)










import os





def lowerCAmelCase__()    ->				Optional[Any]:







	'''simple docstring'''







	lowerCamelCase__        =		os.path.dirname(os.path.realpath(__snake_case							)							)
	lowerCamelCase__        =		os.path.join(__snake_case	,'''triangle.txt'''							)

	with open(__snake_case							) as f:
		lowerCamelCase__        =		f.readlines()

	lowerCamelCase__        =		[[int(__snake_case							) for y in x.rstrip('''\r\n'''							).split(''' '''							)] for x in triangle]

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


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



