






'''simple docstring'''
import os





def  _a(  ):




      '''simple docstring'''






      with open(os.path.dirname(UpperCamelCase__							) + '''/p022_names.txt'''							) as file:
            SCREAMING_SNAKE_CASE__     :				int									=str(file.readlines()[0]							)
            SCREAMING_SNAKE_CASE__     :				List[str]									=names.replace('''"''',	''''''							).split(''','''							)

      names.sort()

      SCREAMING_SNAKE_CASE__     :				Dict									=0
      SCREAMING_SNAKE_CASE__     :				Union[str, Any]									=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__     :				str									=0
      return total_score


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







'''simple docstring'''
from math import isqrt





def  _a(  UpperCamelCase__				:						int							):




      '''simple docstring'''






      SCREAMING_SNAKE_CASE__     :				int									=[True] * max_number
      for i in range(2,	isqrt(max_number - 1							) + 1							):
            if is_prime[i]:
                  for j in range(i**2,	UpperCamelCase__,	UpperCamelCase__							):
                        SCREAMING_SNAKE_CASE__     :				Any									=False

      return [i for i in range(2,	UpperCamelCase__							) if is_prime[i]]





def  _a(  UpperCamelCase__				:						int = 1_0**8							):




      '''simple docstring'''






      SCREAMING_SNAKE_CASE__     :				Tuple									=calculate_prime_numbers(max_number // 2							)

      SCREAMING_SNAKE_CASE__     :				int									=0
      SCREAMING_SNAKE_CASE__     :				int									=0
      SCREAMING_SNAKE_CASE__     :				Optional[int]									=len(UpperCamelCase__							) - 1
      while left <= right:
            while prime_numbers[left] * prime_numbers[right] >= max_number:
                  right -= 1
            semiprimes_count += right - left + 1
            left += 1

      return semiprimes_count


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