


'''simple docstring'''






from collections.abc import Sequence


def       _snake_case     (  A = None )		->					int:
							if nums is None or not nums:
														raise ValueError('''Input sequence should not be empty''' )

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

							return ans


if __name__ == "__main__":
		import doctest

		doctest.testmod()

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



'''simple docstring'''






def       _snake_case     (  A )		->					int:
							return 1 if digit in (0, 1) else (digit * factorial(digit - 1 ))


def       _snake_case     (  A )		->					bool:
							lowerCAmelCase__      =			0
							lowerCAmelCase__      =			number
							while duplicate > 0:
														lowerCAmelCase__     ,      lowerCAmelCase__      =			divmod(A				,					10 )
														fact_sum += factorial(A )
							return fact_sum == number


if __name__ == "__main__":
		print('''Program to check whether a number is a Krisnamurthy Number or not.''')
		__UpperCAmelCase					       =							int(input('''Enter number: ''').strip())
		print(
		    f"""{number} is {'' if krishnamurthy(number) else 'not '}a Krishnamurthy Number."""
		)