

import os





def 				__a							(       ):
    SCREAMING_SNAKE_CASE__         =    os.path.dirname(os.path.realpath(__A						)						)
    SCREAMING_SNAKE_CASE__         =    os.path.join(__A			,							"triangle.txt"						)

    with open(__A						) as f:
        SCREAMING_SNAKE_CASE__         =    f.readlines()

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

    for i in range(1			,							len(__A						)						):
        for j in range(len(a[i]						)						):
            SCREAMING_SNAKE_CASE__         =    a[i - 1][j] if j != len(a[i - 1]						) else 0
            SCREAMING_SNAKE_CASE__         =    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())





A__										=      10**8





def 				__a							(       __A						):
    if n % 10 == 0:
        return False
    SCREAMING_SNAKE_CASE__         =    str(__A						)
    return s == s[::-1]





def 				__a							(       ):
    SCREAMING_SNAKE_CASE__         =    set()
    SCREAMING_SNAKE_CASE__         =    1
    SCREAMING_SNAKE_CASE__         =    5
    while sum_squares < LIMIT:
        SCREAMING_SNAKE_CASE__         =    first_square + 1
        while sum_squares < LIMIT:
            if is_palindrome(__A						):
                answer.add(__A						)
            last_square += 1
            sum_squares += last_square**2
        first_square += 1
        SCREAMING_SNAKE_CASE__         =    first_square**2 + (first_square + 1) ** 2

    return sum(__A						)


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


