





'''simple docstring'''

import os




def  _a     (				):





      """simple docstring"""



      _snake_case		:						Dict         =  os.path.dirname(os.path.realpath(lowerCAmelCase_						)						)
      _snake_case		:						List[str]         =  os.path.join(lowerCAmelCase_      ,   '''triangle.txt'''						)

      with open(lowerCAmelCase_						) as in_file:
            _snake_case		:						Any         =  [[int(lowerCAmelCase_						) for i in line.split()] for line in in_file]

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


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









'''simple docstring'''

from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_tf_available, is_torch_available


UpperCAmelCase       :		Dict		=				{'configuration_hubert': ['HUBERT_PRETRAINED_CONFIG_ARCHIVE_MAP', 'HubertConfig']}

try:
   if not is_torch_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   UpperCAmelCase       :		Union[str, Any]		=				[
       'HUBERT_PRETRAINED_MODEL_ARCHIVE_LIST',
       'HubertForCTC',
       'HubertForSequenceClassification',
       'HubertModel',
       'HubertPreTrainedModel',
   ]


try:
   if not is_tf_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   UpperCAmelCase       :		Optional[int]		=				[
       'TF_HUBERT_PRETRAINED_MODEL_ARCHIVE_LIST',
       'TFHubertForCTC',
       'TFHubertModel',
       'TFHubertPreTrainedModel',
   ]

if TYPE_CHECKING:
   from .configuration_hubert import HUBERT_PRETRAINED_CONFIG_ARCHIVE_MAP, HubertConfig

   try:
      if not is_torch_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .modeling_hubert import (
          HUBERT_PRETRAINED_MODEL_ARCHIVE_LIST,
          HubertForCTC,
          HubertForSequenceClassification,
          HubertModel,
          HubertPreTrainedModel,
      )

   try:
      if not is_tf_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .modeling_tf_hubert import (
          TF_HUBERT_PRETRAINED_MODEL_ARCHIVE_LIST,
          TFHubertForCTC,
          TFHubertModel,
          TFHubertPreTrainedModel,
      )


else:
   import sys

   UpperCAmelCase       :		Optional[int]		=				_LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)


