





from __future__ import annotations
def      A__       (    SCREAMING_SNAKE_CASE_   :      list[int]						)  ->  int:






   """simple docstring"""







   if not nums:
      return 0
   _UpperCAmelCase           =   nums[0]
   _UpperCAmelCase           =   0
   for num in nums[1:]:
      _UpperCAmelCase       ,      _UpperCAmelCase           =   (
          max_excluding + num,
          max(SCREAMING_SNAKE_CASE_				,	SCREAMING_SNAKE_CASE_						),
      )
   return max(SCREAMING_SNAKE_CASE_				,	SCREAMING_SNAKE_CASE_						)


if __name__ == "__main__":
   import doctest

   doctest.testmod()

'''simple docstring'''

from cva import destroyAllWindows, imread, imshow, waitKey


def        UpperCAmelCase_ (  lowerCamelCase_			):







 """simple docstring"""


 lowerCAmelCase__		,     lowerCAmelCase__     :   Tuple     		=	img.shape[0], img.shape[1]

 # converting each pixel's color to its negative
 for i in range(lowerCamelCase_			):
  for j in range(lowerCamelCase_			):
   lowerCAmelCase__     :   Optional[int]     		=	[2_5_5, 2_5_5, 2_5_5] - img[i][j]

 return img


if __name__ == "__main__":
     # read original image
     snake_case									=    imread("""image_data/lena.jpg""", 1)

     # convert to its negative
     snake_case									=    convert_to_negative(img)

     # show result image
     imshow("""negative of original image""", img)
     waitKey(0)
     destroyAllWindows()





