


'''simple docstring'''



import os




def       _a      (		):





     '''simple docstring'''






     __UpperCAmelCase      :					Tuple    				=     0
     __UpperCAmelCase      :					Dict    				=     0
     with open(os.path.dirname(_lowercase    ) + '''/p022_names.txt'''    ) as file:
          __UpperCAmelCase      :					Optional[Any]    				=     str(file.readlines()[0]    )
          __UpperCAmelCase      :					List[str]    				=     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
          __UpperCAmelCase      :					List[str]    				=     0
     return total_sum


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



'''simple docstring'''



import re




def       _a      (		_lowercase   :      List[Any]    ):





     '''simple docstring'''






     def docstring_decorator(_lowercase   :      str    ):
          __UpperCAmelCase      :					Tuple    				=     fn.__doc__
          __UpperCAmelCase      :					Tuple    				=     func_doc.split('''\n'''    )
          __UpperCAmelCase      :					Optional[Any]    				=     0
          while i < len(_lowercase    ) and re.search(R'''^\s*Examples?:\s*$'''     ,   lines[i]    ) is None:
               i += 1
          if i < len(_lowercase    ):
               __UpperCAmelCase      :					Optional[int]    				=     example_docstring
               __UpperCAmelCase      :					Tuple    				=     '''\n'''.join(_lowercase    )
          else:
               raise ValueError(
                   F'The function {fn} should have an empty \'Examples:\' in its docstring as placeholder, '
                   F'current docstring is:\n{func_doc}'    )
          __UpperCAmelCase      :					Tuple    				=     func_doc
          return fn

     return docstring_decorator