




'''simple docstring'''

def __UpperCAmelCase	(   _UpperCAmelCase		:   Optional[int]						)      ->      str:
			return "".join(chr(ord(__lowerCamelCase						) - 32						) if "a" <= char <= "z" else char for char in word						)


if __name__ == "__main__":
						from doctest import testmod

						testmod()











import os





def 						__A						(      ) ->			Dict:
	with open(os.path.dirname(__lowerCamelCase       ) + """/p022_names.txt"""       ) as file:
		a									=				str(file.readlines()[0]       )
		a									=				names.replace("""\""""				,     """"""       ).split(""","""       )

	names.sort()

	a									=				0
	a									=				0

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

		total_score += (i + 1) * name_score
		a									=				0
	return total_score


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

