





from typing import TYPE_CHECKING

# rely on isort to merge the imports
from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available, is_vision_available


__lowerCamelCase	:					Optional[int]			  =					{
    """configuration_efficientnet""": [
        """EFFICIENTNET_PRETRAINED_CONFIG_ARCHIVE_MAP""",
        """EfficientNetConfig""",
        """EfficientNetOnnxConfig""",
    ]
}

try:
    if not is_vision_available():
        raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
    pass
else:
    __lowerCamelCase	:					Optional[int]			  =					["""EfficientNetImageProcessor"""]

try:
    if not is_torch_available():
        raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
    pass
else:
    __lowerCamelCase	:					Tuple			  =					[
        """EFFICIENTNET_PRETRAINED_MODEL_ARCHIVE_LIST""",
        """EfficientNetForImageClassification""",
        """EfficientNetModel""",
        """EfficientNetPreTrainedModel""",
    ]

if TYPE_CHECKING:
    from .configuration_efficientnet import (
        EFFICIENTNET_PRETRAINED_CONFIG_ARCHIVE_MAP,
        EfficientNetConfig,
        EfficientNetOnnxConfig,
    )

    try:
        if not is_vision_available():
            raise OptionalDependencyNotAvailable()
    except OptionalDependencyNotAvailable:
        pass
    else:
        from .image_processing_efficientnet import EfficientNetImageProcessor

    try:
        if not is_torch_available():
            raise OptionalDependencyNotAvailable()
    except OptionalDependencyNotAvailable:
        pass
    else:
        from .modeling_efficientnet import (
            EFFICIENTNET_PRETRAINED_MODEL_ARCHIVE_LIST,
            EfficientNetForImageClassification,
            EfficientNetModel,
            EfficientNetPreTrainedModel,
        )

else:
    import sys

    __lowerCamelCase	:					Optional[Any]			  =					_LazyModule(__name__, globals()["""__file__"""], _import_structure)







import os



def 		A_    (					)						->			int:
 UpperCamelCase     : List[str]	     =       os.path.dirname(os.path.realpath(_lowerCAmelCase					)					)
 UpperCamelCase     : Any	     =       os.path.join(_lowerCAmelCase							,       "triangle.txt"					)

 with open(_lowerCAmelCase					) as f:
  UpperCamelCase     : Optional[Any]	     =       f.readlines()

 UpperCamelCase     : Tuple	     =       []
 for line in triangle:
  UpperCamelCase     : List[str]	     =       []
  for number in line.strip().split(" "					):
   numbers_from_line.append(int(_lowerCAmelCase					)					)
  a.append(_lowerCAmelCase					)

 for i in range(1							,       len(_lowerCAmelCase					)					):
  for j in range(len(a[i]					)					):
   UpperCamelCase     : List[Any]	     =       a[i - 1][j] if j != len(a[i - 1]					) else 0
   UpperCamelCase     : Dict	     =       a[i - 1][j - 1] if j > 0 else 0
   a[i][j] += max(_lowerCAmelCase							,       _lowerCAmelCase					)
 return max(a[-1]					)


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