"""simple docstring"""





from PIL import Image


def    lowercase_   (   _lowerCamelCase:	Image						,   _lowerCamelCase:	float      ) ->      Image:



							'''simple docstring'''

							def brightness(_lowerCamelCase:	int      ) -> float:
														return 128 + level + (c - 128)

							if not -255.0 <= level <= 255.0:
														raise ValueError("level must be between -255.0 (black) and 255.0 (white)"      )
							return img.point(_lowerCamelCase      )


if __name__ == "__main__":
				# Load image
				with Image.open('''image_data/lena.jpg''') as img:
								# Change brightness to 100
								__A  =				change_brightness(img, 100)
								brigt_img.save('''image_data/lena_brightness.png''', format='''png''')

"""simple docstring"""





import os


def    lowercase_   (   ) ->      List[str]:



							'''simple docstring'''

							__lowerCamelCase					:		Union[str, Any]		   =     os.path.dirname(os.path.realpath(_lowerCamelCase      )      )
							__lowerCamelCase					:		int		   =     os.path.join(_lowerCamelCase						,   "triangle.txt"      )

							with open(_lowerCamelCase      ) as f:
														__lowerCamelCase					:		List[str]		   =     f.readlines()

							__lowerCamelCase					:		List[str]		   =     []
							for line in triangle:
														__lowerCamelCase					:		Optional[int]		   =     []
														for number in line.strip().split(" "      ):
																					numbers_from_line.append(int(_lowerCamelCase      )      )
														a.append(_lowerCamelCase      )

							for i in range(1						,   len(_lowerCamelCase      )      ):
														for j in range(len(a[i]      )      ):
																					__lowerCamelCase					:		int		   =     a[i - 1][j] if j != len(a[i - 1]      ) else 0
																					__lowerCamelCase					:		Union[str, Any]		   =     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())