



"""simple docstring"""
import os
def   A_    (     ):







						'''simple docstring'''


						snake_case_					:Tuple		=     0
						snake_case_					:Tuple		=     0
						with open(os.path.dirname(_lowercase      ) + """/p022_names.txt"""      ) as file:
												snake_case_					:List[str]		=     str(file.readlines()[0]      )
												snake_case_					:Union[str, Any]		=     name.replace("""\"""",   """"""      ).split(""","""      )

						name.sort()
						for i in range(len(_lowercase      )      ):
												for j in name[i]:
																		temp_sum += ord(_lowercase      ) - ord("""A"""      ) + 1
												total_sum += (i + 1) * temp_sum
												snake_case_					:List[str]		=     0
						return total_sum


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







def  A					(				UpperCAmelCase					):
					if not isinstance(UpperCAmelCase	,	UpperCAmelCase					):
										_snake_case							:       Optional[Any]												= F"""Input value of [number={number}] must be an integer"""
										raise TypeError(UpperCAmelCase					)
					if number < 1:
										raise ValueError("Input must be a positive integer"					)
					return number * (2 * number - 1)


if __name__ == "__main__":
							import doctest

							doctest.testmod()