
"""simple docstring"""
import os

def 				lowercase      ():
						__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"""
import unittest

from transformers import is_torch_available, load_tool

from .test_tools_common import ToolTesterMixin


if is_torch_available():
			import torch
class      lowerCAmelCase_						(							unittest.TestCase							,							A__				):



							'''simple docstring'''





							def  A__		(				self							)   ->       Any:
													__lowerCAmelCase        =       load_tool("""speech-to-text"""							)
													self.tool.setup()




							def  A__		(				self							)   ->       int:
													__lowerCAmelCase        =       self.tool(torch.ones(3_000							)							)
													self.assertEqual(snake_case_  ,							""" you"""							)




							def  A__		(				self							)   ->       Optional[int]:
													__lowerCAmelCase        =       self.tool(audio=torch.ones(3_000							)							)
													self.assertEqual(snake_case_  ,							""" you"""							)
