


from PIL import Image






def 							__lowercase     (				__lowerCAmelCase							:       Image      ,					__lowerCAmelCase							:       float     ):

							def brightness(__lowerCAmelCase							:       int     ) -> float:
														return 1_2_8 + level + (c - 1_2_8)

							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
												snake_case							: Optional[Any]      =   change_brightness(img, 1_00)
												brigt_img.save('''image_data/lena_brightness.png''', format='''png''')








from math import ceil, sqrt






def 							__lowercase     (				__lowerCAmelCase							:       int = 1_0_0_0_0_0_0     ):
							a__    =  0

							for outer_width in range(3      ,					(limit // 4) + 2     ):
														if outer_width**2 > limit:
																					a__    =  max(ceil(sqrt(outer_width**2 - limit     )     )      ,					1     )
														else:
																					a__    =  1
														if (outer_width - hole_width_lower_bound) % 2:
																					hole_width_lower_bound += 1

														answer += (outer_width - hole_width_lower_bound - 2) // 2 + 1

							return answer


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




