






'''simple docstring'''







import os


def 			__UpperCamelCase				(			):
       """simple docstring"""




       a_	    = os.path.dirname(os.path.realpath(lowercase_      )      )
       a_	    = os.path.join(lowercase_      ,					'triangle.txt'      )

       with open(lowercase_      ) as f:
              a_	    = f.readlines()

       a_	    = [[int(lowercase_      ) for y in x.rstrip('\r\n'      ).split(' '      )] for x in triangle]

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


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












'''simple docstring'''







def 			__UpperCamelCase				(			lowercase_					:     int      ,					lowercase_					:     int      ):
       """simple docstring"""




       return (input_a, input_a).count(0      ) % 2


def 			__UpperCamelCase				(			):
       """simple docstring"""




       assert xor_gate(0      ,					0      ) == 0
       assert xor_gate(0      ,					1      ) == 1
       assert xor_gate(1      ,					0      ) == 1
       assert xor_gate(1      ,					1      ) == 0


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




