



"""simple docstring"""







from PIL import Image



def      __UpperCAmelCase      (    __lowerCamelCase						,     __lowerCamelCase	)							->      Image:
		lowercase__   :    Union[str, Any]				=			(2_59 * (level + 2_55)) / (2_55 * (2_59 - level))

		def contrast(__lowerCamelCase	) -> int:
				return int(1_28 + factor * (c - 1_28)	)

		return img.point(__lowerCamelCase	)


if __name__ == "__main__":
							# Load image
							with Image.open('image_data/lena.jpg') as img:
														# Change contrast to 170
														lowerCAmelCase_   						=   change_contrast(img, 170)
														cont_img.save('image_data/lena_high_contrast.png', format='png')





"""simple docstring"""







import os



def      __UpperCAmelCase      (    )							->      int:
		with open(os.path.dirname(__lowerCamelCase	) + '''/p022_names.txt'''	) as file:
				lowercase__   :    List[Any]				=			str(file.readlines()[0]	)
				lowercase__   :    Dict				=			names.replace('''"'''						,     ''''''	).split(''','''	)

		names.sort()

		lowercase__   :    int				=			0
		lowercase__   :    Optional[Any]				=			0

		for i, name in enumerate(__lowerCamelCase	):
				for letter in name:
						name_score += ord(__lowerCamelCase	) - 64

				total_score += (i + 1) * name_score
				lowercase__   :    List[str]				=			0
		return total_score


if __name__ == "__main__":
							print(solution())
