


'''simple docstring'''

def __snake_case      (   UpperCAmelCase_		:		int = 10**9	):
 lowerCamelCase_  				=						1
 lowerCamelCase_  				=						2

 lowerCamelCase_  				=						0
 lowerCamelCase_  				=						0
 lowerCamelCase_  				=						0
 while perimeter <= max_perimeter:
  perimeters_sum += perimeter

  prev_value += 2 * value
  value += prev_value

  lowerCamelCase_  				=						2 * value + 2 if i % 2 == 0 else 2 * value - 2
  i += 1

 return perimeters_sum


if __name__ == "__main__":
     print(f'''{solution() = }''')







'''simple docstring'''

from collections.abc import Sequence





def __snake_case      (   UpperCAmelCase_		:		Sequence[int] | None = None	):
 if nums is None or not nums:
  raise ValueError("Input sequence should not be empty"	)

 lowerCamelCase_  				=						nums[0]
 for i in range(1      ,       len(UpperCAmelCase_	)	):
  lowerCamelCase_  				=						nums[i]
  lowerCamelCase_  				=						max(UpperCAmelCase_      ,       ans + num      ,       UpperCAmelCase_	)

 return ans


if __name__ == "__main__":
     import doctest

     doctest.testmod()

     # Try on a sample input from the user
     a_						:       Any      			=				int(input("""Enter number of elements : """).strip())
     a_						:       Union[str, Any]      			=				list(map(int, input("""\nEnter the numbers : """).strip().split()))[:n]
     print(max_subsequence_sum(array))



