


def  _UpperCAmelCase						( __lowerCamelCase = 20							)		->int:


 '''simple docstring'''

 try:
  snake_case :			Tuple							=   int(__lowerCamelCase							)
 except (TypeError, ValueError):
  raise TypeError('''Parameter n must be int or castable to int.'''							)
 if n <= 0:
  raise ValueError('''Parameter n must be greater than or equal to one.'''							)
 snake_case :			List[str]							=   0
 while 1:
  i += n * (n - 1)
  snake_case :			Dict							=   0
  for j in range(2			,  __lowerCamelCase							):
   if i % j != 0:
    snake_case :			Dict							=   1
    break
  if nfound == 0:
   if i == 0:
    snake_case :			str							=   1
   return i
 return None


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










import os






def  _UpperCAmelCase						( )		->Tuple:


 '''simple docstring'''
 snake_case :			Dict							=   0
 snake_case :			int							=   0
 with open(os.path.dirname(__lowerCamelCase							) + '''/p022_names.txt'''							) as file:
  snake_case :			int							=   str(file.readlines()[0]							)
  snake_case :			Any							=   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
  snake_case :			List[Any]							=   0
 return total_sum


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






