

from __future__ import annotations
def 						_snake_case(   SCREAMING_SNAKE_CASE__      :     list   ,      SCREAMING_SNAKE_CASE__      :     int   ,      SCREAMING_SNAKE_CASE__      :     int   ,      SCREAMING_SNAKE_CASE__      :     int				)							->				list:





    '''simple docstring'''






    A__   				=       []
    A__				,						A__   				=       input_list[low:mid], input_list[mid : high + 1]
    while left and right:
        result.append((left if left[0] <= right[0] else right).pop(0				)				)
    A__   				=       result + left + right
    return input_list
def 						_snake_case(   SCREAMING_SNAKE_CASE__      :     list				)							->				list:





    '''simple docstring'''






    if len(SCREAMING_SNAKE_CASE__				) <= 1:
        return input_list
    A__   				=       list(SCREAMING_SNAKE_CASE__				)

    # iteration for two-way merging
    A__   				=       2
    while p <= len(SCREAMING_SNAKE_CASE__				):
        # getting low, high and middle value for merge-sort of single list
        for i in range(0   ,      len(SCREAMING_SNAKE_CASE__				)   ,      SCREAMING_SNAKE_CASE__				):
            A__   				=       i
            A__   				=       i + p - 1
            A__   				=       (low + high + 1) // 2
            A__   				=       merge(SCREAMING_SNAKE_CASE__   ,      SCREAMING_SNAKE_CASE__   ,      SCREAMING_SNAKE_CASE__   ,      SCREAMING_SNAKE_CASE__				)
        # final merge of last two parts
        if p * 2 >= len(SCREAMING_SNAKE_CASE__				):
            A__   				=       i
            A__   				=       merge(SCREAMING_SNAKE_CASE__   ,      0   ,      SCREAMING_SNAKE_CASE__   ,      len(SCREAMING_SNAKE_CASE__				) - 1				)
            break
        p *= 2

    return input_list


if __name__ == "__main__":
     lowercase_			=  input("Enter numbers separated by a comma:\n").strip()
     if user_input == "":
          lowercase_			=  []
     else:
          lowercase_			=  [int(item.strip()) for item in user_input.split(",")]
     print(iter_merge_sort(unsorted))




from collections.abc import Sequence
def 						_snake_case(   SCREAMING_SNAKE_CASE__      :     Sequence[int] | None = None				)							->				int:





    '''simple docstring'''






    if nums is None or not nums:
        raise ValueError('Input sequence should not be empty'				)

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

    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))

