




import os







def 		lowercase__   (		):





     '''simple docstring'''






     __magic_name__							:	Dict    							=							os.path.dirname(os.path.realpath(__A				)				)
     __magic_name__							:	Optional[Any]    							=							os.path.join(__A							,'''triangle.txt'''				)

     with open(__A				) as f:
          __magic_name__							:	Optional[Any]    							=							f.readlines()

     __magic_name__							:	str    							=							[]
     for line in triangle:
          __magic_name__							:	Union[str, Any]    							=							[]
          for number in line.strip().split(''' '''				):
               numbers_from_line.append(int(__A				)				)
          a.append(__A				)

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


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









import sys
import turtle







def 		lowercase__   (		__A:	tuple[float, float]							,__A:	tuple[float, float]				):





					'''simple docstring'''






					return (pa[0] + pa[0]) / 2, (pa[1] + pa[1]) / 2







def 		lowercase__   (		__A:	tuple[float, float]							,__A:	tuple[float, float]							,__A:	tuple[float, float]							,__A:	int							,):





					'''simple docstring'''






					my_pen.up()
					my_pen.goto(vertexa[0]							,vertexa[1]				)
					my_pen.down()
					my_pen.goto(vertexa[0]							,vertexa[1]				)
					my_pen.goto(vertexa[0]							,vertexa[1]				)
					my_pen.goto(vertexa[0]							,vertexa[1]				)

					if depth == 0:
										return

					triangle(__A							,get_mid(__A							,__A				)							,get_mid(__A							,__A				)							,depth - 1				)
					triangle(__A							,get_mid(__A							,__A				)							,get_mid(__A							,__A				)							,depth - 1				)
					triangle(__A							,get_mid(__A							,__A				)							,get_mid(__A							,__A				)							,depth - 1				)


if __name__ == "__main__":
	if len(sys.argv) != 2:
		raise ValueError(
		    '''Correct format for using this script: '''
		    '''python fractals.py <int:depth_for_fractal>'''
		)
	__lowerCamelCase   :						Any				=			turtle.Turtle()
	my_pen.ht()
	my_pen.speed(5)
	my_pen.pencolor('''red''')

	__lowerCamelCase   :						Optional[Any]				=			[(-1_75, -1_25), (0, 1_75), (1_75, -1_25)]  # vertices of triangle
	triangle(vertices[0], vertices[1], vertices[2], int(sys.argv[1]))



