





import os




def  A_(      ):
	UpperCAmelCase_		    =  0
	UpperCAmelCase_		    =  0
	with open(os.path.dirname(A ) + """/p022_names.txt""" ) as file:
		UpperCAmelCase_		    =  str(file.readlines()[0] )
		UpperCAmelCase_		    =  name.replace("""\""""					,   """""" ).split(""",""" )

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


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









def  A_(      A = 1000 ):
	UpperCAmelCase_		    =  0
	for i in range(A ):
		if i % 3 == 0 or i % 5 == 0:
			result += i
	return result


if __name__ == "__main__":
				print(f"{solution() = }")


