


import os

def 						_UpperCAmelCase				(			):
     __UpperCamelCase    							=os.path.dirname(os.path.realpath(SCREAMING_SNAKE_CASE__				)				)
     __UpperCamelCase    							=os.path.join(SCREAMING_SNAKE_CASE__			,     'triangle.txt'				)

     with open(SCREAMING_SNAKE_CASE__				) as f:
          __UpperCamelCase    							=f.readlines()

     __UpperCamelCase    							=[]
     for line in triangle:
          __UpperCamelCase    							=[]
          for number in line.strip().split(' '				):
               numbers_from_line.append(int(SCREAMING_SNAKE_CASE__				)				)
          a.append(SCREAMING_SNAKE_CASE__				)

     for i in range(1			,     len(SCREAMING_SNAKE_CASE__				)				):
          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(SCREAMING_SNAKE_CASE__			,     SCREAMING_SNAKE_CASE__				)
     return max(a[-1]				)


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













from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_sentencepiece_available


A__	:			Optional[int]			   = {}

try:
							if not is_sentencepiece_available():
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							pass
else:
							A__	:			Optional[int]			   = ['GPTSw3Tokenizer']


if TYPE_CHECKING:
							try:
														if not is_sentencepiece_available():
																					raise OptionalDependencyNotAvailable()
							except OptionalDependencyNotAvailable:
														pass
							else:
														from .tokenization_gpt_swa import GPTSwaTokenizer

else:
							import sys

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




