





'''simple docstring'''


from PIL import Image
def 							UpperCAmelCase_  (						__lowerCamelCase					:					Image	,__lowerCamelCase					:					float ):

   def brightness(__lowerCamelCase					:					int ) -> float:
      return 1_28 + level + (c - 1_28)

   if not -255.0 <= level <= 255.0:
      raise ValueError("level must be between -255.0 (black) and 255.0 (white)" )
   return img.point(__lowerCamelCase )


if __name__ == "__main__":
 # Load image
 with Image.open('''image_data/lena.jpg''') as img:
  # Change brightness to 100
  lowerCAmelCase					:     int												=change_brightness(img, 100)
  brigt_img.save('''image_data/lena_brightness.png''', format='''png''')









'''simple docstring'''


def 							UpperCAmelCase_  (						__lowerCamelCase					:					int = 1_00 ):
   lowercase_			:Tuple    			= n * (n + 1) * (2 * n + 1) / 6
   lowercase_			:List[str]    			= (n * (n + 1) / 2) ** 2
   return int(square_of_sum - sum_of_squares )


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


