




'''simple docstring'''





from ctypes import c_float, sizeof
from enum import Enum
from typing import TYPE_CHECKING, Optional, Union


if TYPE_CHECKING:
  from .. import AutoFeatureExtractor, AutoProcessor, AutoTokenizer  # tests_ignore




class      UpperCamelCase       (	snake_case__       ):
  a     :Tuple          =					c_float



  @property
  def     a_							(			self ):







      '''simple docstring'''


      return sizeof(self.value )






def UpperCAmelCase    (       UpperCAmelCase_   ,	UpperCAmelCase_   ,	UpperCAmelCase_ = 0						):
    # < 0 is possible if using a dynamic axis
    if dimension <= 0:
        _a				:							List[Any]							       =      fixed_dimension

    dimension -= num_token_to_add
    return dimension





def UpperCAmelCase    (       UpperCAmelCase_   ,	UpperCAmelCase_						):
    return num_parameters * dtype.size





def UpperCAmelCase    (       UpperCAmelCase_						):
    from .. import AutoFeatureExtractor, AutoProcessor, AutoTokenizer  # tests_ignore

    try:
        return AutoProcessor.from_pretrained(UpperCAmelCase_						)
    except (ValueError, OSError, KeyError):
        _a       , _a				:							Optional[int]							       =      None, None
        try:
            _a				:							int							       =      AutoTokenizer.from_pretrained(UpperCAmelCase_						)
        except (OSError, KeyError):
            pass
        try:
            _a				:							List[Any]							       =      AutoFeatureExtractor.from_pretrained(UpperCAmelCase_						)
        except (OSError, KeyError):
            pass

        if tokenizer is not None and feature_extractor is not None:
            raise ValueError(
                F'''Couldn\'t auto-detect preprocessor for {model_name}. Found both a tokenizer and a feature extractor.'''						)
        elif tokenizer is None and feature_extractor is None:
            return None
        elif tokenizer is not None:
            return tokenizer
        else:
            return feature_extractor








'''simple docstring'''
import os
def 							snake_case_    (  ):



    """simple docstring"""




    __lowercase     							=		os.path.dirname(os.path.realpath(a__     )     )
    __lowercase     							=		os.path.join(a__       ,"""triangle.txt"""     )

    with open(a__     ) as f:
        __lowercase     							=		f.readlines()

    __lowercase     							=		[[int(a__     ) for y in x.rstrip("""\r\n"""     ).split(""" """     )] for x in triangle]

    for i in range(1       ,len(a__     )     ):
        for j in range(len(a[i]     )     ):
            __lowercase     							=		a[i - 1][j] if j != len(a[i - 1]     ) else 0
            __lowercase     							=		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())




