
"""simple docstring"""





import os







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

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


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










"""simple docstring"""





from math import gcd







def 	lowerCAmelCase_(			SCREAMING_SNAKE_CASE = 1_20_00       )       ->						int:
    """simple docstring"""

    UpperCamelCase__								=     0
    for d in range(max_d + 1       ):
        for n in range(d // 3 + 1			,						(d + 1) // 2       ):
            if gcd(SCREAMING_SNAKE_CASE			,						SCREAMING_SNAKE_CASE       ) == 1:
                fractions_number += 1
    return fractions_number


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




