




from PIL import Image




def 					lowerCamelCase__       (						A__       :					Image  ,			A__       :					float	):





       '''simple docstring'''



       def brightness(A__       :					int	) -> float:
              return 128 + level + (c - 128)

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


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





'''simple docstring'''
def 					a__       (					lowerCAmelCase__						)    ->	int:
    UpperCAmelCase__			:		Tuple													=				0
    while num > 0:
        digit_sum += num % 10
        num //= 10
    return digit_sum





def 					a__       (					lowerCAmelCase__ = 1_00						)    ->	int:
    UpperCAmelCase__			:		Dict													=				1
    UpperCAmelCase__			:		str													=				2

    for i in range(2  ,					max_n + 1						):
        UpperCAmelCase__			:		Tuple													=				pre_numerator
        UpperCAmelCase__			:		Tuple													=				2 * i // 3 if i % 3 == 0 else 1
        UpperCAmelCase__			:		str													=				cur_numerator
        UpperCAmelCase__			:		List[str]													=				e_cont * pre_numerator + temp

    return sum_digits(lowerCAmelCase__						)


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