
def 							SCREAMING_SNAKE_CASE_	(					UpperCAmelCase_	:     int = 1_0_0				)			->						int:
       SCREAMING_SNAKE_CASE_							:				Optional[Any]		=set()

       SCREAMING_SNAKE_CASE_							:				int		=0

       SCREAMING_SNAKE_CASE_							:				Any		=n + 1  # maximum limit

       for a in range(2			,							UpperCAmelCase_				):
              for b in range(2			,							UpperCAmelCase_				):
                     SCREAMING_SNAKE_CASE_							:				int		=a**b  # calculates the current power
                     collect_powers.add(UpperCAmelCase_				)  # adds the result to the set
       return len(UpperCAmelCase_				)


if __name__ == "__main__":
 print("""Number of terms """, solution(int(str(input()).strip())))


from collections.abc import Sequence
def 							SCREAMING_SNAKE_CASE_	(					UpperCAmelCase_	:     Sequence[int] | None = None				)			->						int:
       if nums is None or not nums:
              raise ValueError('''Input sequence should not be empty'''				)

       SCREAMING_SNAKE_CASE_							:				Tuple		=nums[0]
       for i in range(1			,							len(UpperCAmelCase_				)				):
              SCREAMING_SNAKE_CASE_							:				Any		=nums[i]
              SCREAMING_SNAKE_CASE_							:				Optional[int]		=max(UpperCAmelCase_			,							ans + num			,							UpperCAmelCase_				)

       return ans


if __name__ == "__main__":
 import doctest

 doctest.testmod()

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