





import numpy as np



def   __lowercase  ( _SCREAMING_SNAKE_CASE      )					->  Dict:


      '''simple docstring'''


      SCREAMING_SNAKE_CASE						=		np.exp(_SCREAMING_SNAKE_CASE      )

      # Add up the all the exponentials
      SCREAMING_SNAKE_CASE						=		np.sum(_SCREAMING_SNAKE_CASE      )

      # Divide every exponent by the sum of all exponents
      SCREAMING_SNAKE_CASE						=		exponent_vector / sum_of_exponents

      return softmax_vector


if __name__ == "__main__":
      print(softmax((0,)))









import os



def   __lowercase  ( )					->  int:


      '''simple docstring'''


      SCREAMING_SNAKE_CASE						=		os.path.dirname(os.path.realpath(_SCREAMING_SNAKE_CASE      )      )
      SCREAMING_SNAKE_CASE						=		os.path.join(_SCREAMING_SNAKE_CASE					,		"""triangle.txt"""      )

      with open(_SCREAMING_SNAKE_CASE      ) as in_file:
            SCREAMING_SNAKE_CASE						=		[[int(_SCREAMING_SNAKE_CASE      ) for i in line.split()] for line in in_file]

      while len(_SCREAMING_SNAKE_CASE      ) != 1:
            SCREAMING_SNAKE_CASE						=		triangle.pop()
            SCREAMING_SNAKE_CASE						=		triangle[-1]
            for j in range(len(_SCREAMING_SNAKE_CASE      ) - 1      ):
                  curr_row[j] += max(last_row[j]					,		last_row[j + 1]      )
      return triangle[0][0]


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


