



import os

def       A_   (						):

				"""simple docstring"""
				a__					   =		0
				a__					   =		0
				with open(os.path.dirname(_lowercase		) + """/p022_names.txt"""		) as file:
								a__					   =		str(file.readlines()[0]		)
								a__					   =		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
								a__					   =		0
				return total_sum


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





'''simple docstring'''



def       _a      (		_lowercase   :      str    ):





     '''simple docstring'''






     __UpperCAmelCase      :					Union[str, Any]    				=     5381
     for x in s:
          __UpperCAmelCase      :					Union[str, Any]    				=     ((hash_value << 5) + hash_value) + ord(_lowercase    )
     return hash_value & 0XFFFFFFFF