






import os

def     lowerCAmelCase__  (  ):



  '''simple docstring'''
  _a						: Dict    =			os.path.dirname(os.path.realpath(UpperCamelCase__       )       )
  _a						: str    =			os.path.join(UpperCamelCase__  ,     """triangle.txt"""       )

  with open(UpperCamelCase__       ) as f:
    _a						: Optional[Any]    =			f.readlines()

  _a						: List[str]    =			[[int(UpperCamelCase__       ) for y in x.rstrip("""\r\n"""       ).split(""" """       )] for x in triangle]

  for i in range(1  ,     len(UpperCamelCase__       )       ):
    for j in range(len(a[i]       )       ):
      _a						: str    =			a[i - 1][j] if j != len(a[i - 1]       ) else 0
      _a						: Any    =			a[i - 1][j - 1] if j > 0 else 0
      a[i][j] += max(UpperCamelCase__  ,     UpperCamelCase__       )
  return max(a[-1]       )


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









"""simple docstring"""




from __future__ import annotations

import sys

def     lowerCAmelCase__  (  UpperCamelCase__       ):



  '''simple docstring'''
  if n < 0:
    raise ValueError("""Negative arguments are not supported"""       )
  return _fib(UpperCamelCase__       )[0]

def     lowerCAmelCase__  (  UpperCamelCase__       ):



  '''simple docstring'''
  if n == 0:  # (F(0), F(1))
    return (0, 1)

  # F(2n) = F(n)[2F(n+1) − F(n)]
  # F(2n+1) = F(n+1)^2+F(n)^2
  _a   ,						_a						: Dict    =			_fib(n // 2       )
  _a						: Dict    =			a * (b * 2 - a)
  _a						: Optional[Any]    =			a * a + b * b
  return (d, c + d) if n % 2 else (c, d)


if __name__ == "__main__":
 _snake_case					   =     int(sys.argv[1])
 print(F'''fibonacci({n}) is {fibonacci(n)}''')

