



import os







def    _snake_case (       )     ->     Tuple:






      '''simple docstring'''







      UpperCAmelCase_  :	Union[str, Any]				      =		os.path.dirname(os.path.realpath(__snake_case    )    )
      UpperCAmelCase_  :	Optional[Any]				      =		os.path.join(__snake_case					,  "triangle.txt"    )

      with open(__snake_case    ) as f:
            UpperCAmelCase_  :	Optional[Any]				      =		f.readlines()

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

      for i in range(1					,  len(__snake_case    )    ):
            for j in range(len(a[i]    )    ):
                  UpperCAmelCase_  :	Tuple				      =		a[i - 1][j] if j != len(a[i - 1]    ) else 0
                  UpperCAmelCase_  :	List[str]				      =		a[i - 1][j - 1] if j > 0 else 0
                  a[i][j] += max(__snake_case					,  __snake_case    )
      return max(a[-1]    )


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





def    _snake_case (       __snake_case					,  __snake_case    )     ->     int:






      '''simple docstring'''







      return int((input_a, input_a).count(0    ) != 0    )







def    _snake_case (       )     ->     None:






      '''simple docstring'''







      assert nand_gate(0					,  0    ) == 1
      assert nand_gate(0					,  1    ) == 1
      assert nand_gate(1					,  0    ) == 1
      assert nand_gate(1					,  1    ) == 0


if __name__ == "__main__":
   print(nand_gate(0, 0))
   print(nand_gate(0, 1))
   print(nand_gate(1, 0))
   print(nand_gate(1, 1))
