'''simple docstring'''





import os


def     __lowerCAmelCase						(       )      ->	Dict:





     '''simple docstring'''





     SCREAMING_SNAKE_CASE					:			Union[str, Any]    	=       os.path.dirname(os.path.realpath(a_		)		)
     SCREAMING_SNAKE_CASE					:			Union[str, Any]    	=       os.path.join(a_       ,      'triangle.txt'		)

     with open(a_		) as f:
          SCREAMING_SNAKE_CASE					:			Optional[Any]    	=       f.readlines()

     SCREAMING_SNAKE_CASE					:			Any    	=       []
     for line in triangle:
          SCREAMING_SNAKE_CASE					:			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]		)		):
               SCREAMING_SNAKE_CASE					:			Any    	=       a[i - 1][j] if j != len(a[i - 1]		) else 0
               SCREAMING_SNAKE_CASE					:			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())

'''simple docstring'''





def     __lowerCAmelCase						(       a_ = 1000		)      ->	int:





     '''simple docstring'''





     SCREAMING_SNAKE_CASE					:			Union[str, Any]    	=       2**power
     SCREAMING_SNAKE_CASE					:			Any    	=       str(a_		)
     SCREAMING_SNAKE_CASE					:			int    	=       list(a_		)
     SCREAMING_SNAKE_CASE					:			Any    	=       0

     for i in list_num:
          sum_of_num += int(a_		)

     return sum_of_num


if __name__ == "__main__":
 _lowerCAmelCase  :Tuple  				=    int(input("""Enter the power of 2: """).strip())
 print("""2 ^ """, power, """ = """, 2**power)
 _lowerCAmelCase  :int  				=    solution(power)
 print("""Sum of the digits is: """, result)



