






import os






def  UpperCAmelCase__						(    ):
   lowerCamelCase									=os.path.dirname(os.path.realpath(lowerCamelCase    )    )
   lowerCamelCase									=os.path.join(lowerCamelCase			,"""triangle.txt"""    )

   with open(lowerCamelCase    ) as f:
      lowerCamelCase									=f.readlines()

   lowerCamelCase									=[[int(lowerCamelCase    ) for y in x.rstrip("""\r\n"""    ).split(""" """    )] for x in triangle]

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


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

"""simple docstring"""




def __snake_case (      UpperCamelCase = 10**6    )       ->    int:


		"""simple docstring"""





		if n <= 0:
				raise ValueError('''Please enter an integer greater than 0'''    )

		a__   		=     list(range(n + 1    )    )
		for number in range(2						,					n + 1    ):
				if phi[number] == number:
						phi[number] -= 1
						for multiple in range(number * 2						,					n + 1						,					UpperCamelCase    ):
								a__   		=     (phi[multiple] // number) * (number - 1)

		a__   		=     1
		for number in range(1						,					n + 1    ):
				if (answer / phi[answer]) < (number / phi[number]):
						a__   		=     number

		return answer


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




