






import os





def 		A_			(		)							->List[str]:







 """simple docstring"""

 SCREAMING_SNAKE_CASE							  =						os.path.dirname(os.path.realpath(__A	)	)
 SCREAMING_SNAKE_CASE							  =						os.path.join(__A					,       'triangle.txt'	)

 with open(__A	) as in_file:
  SCREAMING_SNAKE_CASE							  =						[[int(__A	) for i in line.split()] for line in in_file]

 while len(__A	) != 1:
  SCREAMING_SNAKE_CASE							  =						triangle.pop()
  SCREAMING_SNAKE_CASE							  =						triangle[-1]
  for j in range(len(__A	) - 1	):
   curr_row[j] += max(last_row[j]					,       last_row[j + 1]	)
 return triangle[0][0]


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












from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


__UpperCAmelCase      				=							{"configuration_visual_bert": ["VISUAL_BERT_PRETRAINED_CONFIG_ARCHIVE_MAP", "VisualBertConfig"]}

try:
      if not is_torch_available():
            raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
      pass
else:
      __UpperCAmelCase      				=							[
          "VISUAL_BERT_PRETRAINED_MODEL_ARCHIVE_LIST",
          "VisualBertForMultipleChoice",
          "VisualBertForPreTraining",
          "VisualBertForQuestionAnswering",
          "VisualBertForRegionToPhraseAlignment",
          "VisualBertForVisualReasoning",
          "VisualBertLayer",
          "VisualBertModel",
          "VisualBertPreTrainedModel",
      ]


if TYPE_CHECKING:
      from .configuration_visual_bert import VISUAL_BERT_PRETRAINED_CONFIG_ARCHIVE_MAP, VisualBertConfig

      try:
            if not is_torch_available():
                  raise OptionalDependencyNotAvailable()
      except OptionalDependencyNotAvailable:
            pass
      else:
            from .modeling_visual_bert import (
                VISUAL_BERT_PRETRAINED_MODEL_ARCHIVE_LIST,
                VisualBertForMultipleChoice,
                VisualBertForPreTraining,
                VisualBertForQuestionAnswering,
                VisualBertForRegionToPhraseAlignment,
                VisualBertForVisualReasoning,
                VisualBertLayer,
                VisualBertModel,
                VisualBertPreTrainedModel,
            )


else:
      import sys

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




