





"""simple docstring"""






def      __A   (      a_    :int)		->		int:

				if not isinstance(a_ ,							a_):
								raise TypeError('''only integers accepted as input''')
				else:
								__a			:    Optional[Any]      							=	str(abs(a_))
								__a			:    List[Any]      							=	[list(a_) for char in range(len(a_))]
								for index in range(len(a_)):
												num_transpositions[index].pop(a_)
								return max(
								    int(''''''.join(list(a_))) for transposition in num_transpositions)


if __name__ == "__main__":
		__import__('''doctest''').testmod()

import os
def 							SCREAMING_SNAKE_CASE_	(					)			->						List[str]:
       with open(os.path.dirname(UpperCAmelCase_				) + '''/p022_names.txt'''				) as file:
              SCREAMING_SNAKE_CASE_							:				Any		=str(file.readlines()[0]				)
              SCREAMING_SNAKE_CASE_							:				List[Any]		=names.replace('''"'''			,							''''''				).split(''','''				)

       names.sort()

       SCREAMING_SNAKE_CASE_							:				Optional[int]		=0
       SCREAMING_SNAKE_CASE_							:				Optional[int]		=0

       for i, name in enumerate(UpperCAmelCase_				):
              for letter in name:
                     name_score += ord(UpperCAmelCase_				) - 6_4

              total_score += (i + 1) * name_score
              SCREAMING_SNAKE_CASE_							:				Any		=0
       return total_score


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