




'''simple docstring'''




import enum
import inspect
import warnings
from functools import wraps
from typing import Callable, Optional

from .logging import get_logger


snake_case__ 							=    set()
snake_case__ 							=    get_logger(__name__)




def     snake_case__     (			lowerCamelCase__					: Optional[str] = None      ) -> Tuple:

					def decorator(lowerCamelCase__					: Callable      ):
										global _emitted_deprecation_warnings

										if inspect.isclass(lowerCamelCase__      ):
															A_			:  Optional[int]			=				deprecated_class_or_function.__init__
															A_			:  Dict			=				deprecated_class_or_function.__name__
										else:
															A_			:  List[Any]			=				deprecated_class_or_function
															A_			:  Tuple			=				deprecated_function.__name__
															# Support deprecating __init__ class method: class name instead
															A_			:  int			=				name if name != '''__init__''' else deprecated_function.__qualname__.split('''.'''      )[-2]

										A_			:  Union[str, Any]			=				(
										    f'{name} is deprecated and will be removed in the next major version of datasets.' + f' {help_message}'
										    if help_message
										    else ''''''
										)

										@wraps(lowerCamelCase__      )
										def wrapper(*lowerCamelCase__					: List[Any]      ,		**lowerCamelCase__					: int      ):
															A_			:  Dict			=				hash(lowerCamelCase__      )
															if func_hash not in _emitted_deprecation_warnings:
																				warnings.warn(lowerCamelCase__      ,		category=lowerCamelCase__      ,		stacklevel=2      )
																				_emitted_deprecation_warnings.add(lowerCamelCase__      )
															return deprecated_function(*lowerCamelCase__      ,		**lowerCamelCase__      )

										A_			:  int			=				'''deprecated'''

										if inspect.isclass(lowerCamelCase__      ):
															A_			:  int			=				wrapper
															return deprecated_class_or_function
										else:
															return wrapper

					return decorator






class      UpperCamelCase_  (enum.EnumMeta  ):







						"""simple docstring"""


						def __getattribute__(  cls   :							Any				,			_lowerCamelCase   :							List[Any]     ):





											"""simple docstring"""







											A_			:  List[str]			=				super().__getattribute__(_lowerCamelCase     )
											if isinstance(_lowerCamelCase				,			enum.Enum     ) and obj._on_access:
																obj._on_access()
											return obj







						def __getitem__(  cls   :							Optional[int]				,			_lowerCamelCase   :							List[Any]     ):





											"""simple docstring"""







											A_			:  Dict			=				super().__getitem__(_lowerCamelCase     )
											if member._on_access:
																member._on_access()
											return member







						def __call__(  cls   :							Any				,			_lowerCamelCase   :							List[str]				,			_lowerCamelCase   :							str=None				,			*, _lowerCamelCase   :							Union[str, Any]=None				,			_lowerCamelCase   :							Any=None				,			_lowerCamelCase   :							Optional[int]=None				,			_lowerCamelCase   :							str=1     ):





											"""simple docstring"""







											A_			:  Optional[int]			=				super().__call__(_lowerCamelCase				,			_lowerCamelCase				,			module=_lowerCamelCase				,			qualname=_lowerCamelCase				,			type=_lowerCamelCase				,			start=_lowerCamelCase     )
											if isinstance(_lowerCamelCase				,			enum.Enum     ) and obj._on_access:
																obj._on_access()
											return obj






class      UpperCamelCase_  (enum.Enum,   metaclass=a__  ):







						"""simple docstring"""


						def __new__(  cls   :							str				,			_lowerCamelCase   :							Optional[Any]     ):





											"""simple docstring"""







											A_			:  List[str]			=				object.__new__(cls     )
											A_			:  Dict			=				value
											A_			:  Optional[Any]			=				member.deprecate
											return member







						@property
						def    _a     (  self   :							int     ):





											"""simple docstring"""







											return ""







						def    _a     (  self   :							str     ):





											"""simple docstring"""







											A_			:  Optional[int]			=				f' {self.help_message}' if self.help_message else ''''''
											warnings.warn(
											    f'\'{self.__objclass__.__name__}\' is deprecated and will be removed in the next major version of datasets.'
											    + help_message				,			_lowerCamelCase				,			stacklevel=3				,			)









'''simple docstring'''




import os




def     snake_case__     (			) -> int:
					A_			:  List[str]			=				os.path.dirname(os.path.realpath(lowerCamelCase__      )      )
					A_			:  str			=				os.path.join(lowerCamelCase__      ,		'''triangle.txt'''      )

					with open(lowerCamelCase__      ) as in_file:
										A_			:  List[str]			=				[[int(lowerCamelCase__      ) for i in line.split()] for line in in_file]

					while len(lowerCamelCase__      ) != 1:
										A_			:  List[str]			=				triangle.pop()
										A_			:  Optional[Any]			=				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())



