



"""simple docstring"""







import os


def  __SCREAMING_SNAKE_CASE (  ):
		_lowercase				: str     =   os.path.dirname(os.path.realpath(__UpperCAmelCase      )      )
		_lowercase				: str     =   os.path.join(__UpperCAmelCase   ,				"""triangle.txt"""      )

		with open(__UpperCAmelCase      ) as in_file:
				_lowercase				: List[str]     =   [[int(__UpperCAmelCase      ) for i in line.split()] for line in in_file]

		while len(__UpperCAmelCase      ) != 1:
				_lowercase				: Any     =   triangle.pop()
				_lowercase				: Any     =   triangle[-1]
				for j in range(len(__UpperCAmelCase      ) - 1      ):
						curr_row[j] += max(last_row[j]   ,				last_row[j + 1]      )
		return triangle[0][0]


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








"""simple docstring"""







from math import factorial


def  __SCREAMING_SNAKE_CASE (  __UpperCAmelCase   ,				__UpperCAmelCase      ):
		return factorial(__UpperCAmelCase      ) / (factorial(__UpperCAmelCase      ) * factorial(n - r      ))


def  __SCREAMING_SNAKE_CASE (  ):
		_lowercase				: Optional[Any]     =   0

		for i in range(1   ,				101      ):
				for j in range(1   ,				i + 1      ):
						if combinations(__UpperCAmelCase   ,				__UpperCAmelCase      ) > 1E6:
								total += 1
		return total


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



