
'''simple docstring'''



from __future__ import annotations


def A (__lowerCamelCase :list[int | float]					,      __lowerCamelCase :int					,      __lowerCamelCase :int						):
						if len(__lowerCamelCase						) == 0:
												raise ValueError("""find_max() arg is an empty sequence"""						)
						if (
						    left >= len(__lowerCamelCase						)
						    or left < -len(__lowerCamelCase						)
						    or right >= len(__lowerCamelCase						)
						    or right < -len(__lowerCamelCase						)
						):
												raise IndexError("""list index out of range"""						)
						if left == right:
												return nums[left]
						_lowerCAmelCase    		=					(left + right) >> 1  # the middle
						_lowerCAmelCase    		=					find_max(__lowerCamelCase					,      __lowerCamelCase					,      __lowerCamelCase						)  # find max in range[left, mid]
						_lowerCAmelCase    		=					find_max(__lowerCamelCase					,      mid + 1					,      __lowerCamelCase						)  # find max in range[mid + 1, right]

						return left_max if left_max >= right_max else right_max


if __name__ == "__main__":
						import doctest

						doctest.testmod(verbose=True)




"""simple docstring"""






import os





def 				A_       ( )					->  Any:
			with open(os.path.dirname(snake_case__		) + '''/p022_names.txt'''		) as file:
						_UpperCamelCase					:Optional[Any]					     =	str(file.readlines()[0]		)
						_UpperCamelCase					:Dict					     =	names.replace('''"'''       ,					''''''		).split(''','''		)

			names.sort()

			_UpperCamelCase					:str					     =	0
			_UpperCamelCase					:Union[str, Any]					     =	0

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

						total_score += (i + 1) * name_score
						_UpperCamelCase					:List[Any]					     =	0
			return total_score


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

