




'''simple docstring'''

import os




def    snake_case__     (  )			->       Optional[Any]:





			'''simple docstring'''






			snake_case__          =						0
			snake_case__          =						0
			with open(os.path.dirname(a	) + """/p022_names.txt"""	) as file:
						snake_case__          =						str(file.readlines()[0]	)
						snake_case__          =						name.replace("""\""""       ,      """"""	).split(""","""	)

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


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


import timeit





class    __UpperCAmelCase	:



   def __init__(				self				:	Dict,						__A				:	Union[str, Any]		):
     if isinstance(__A,						__A		):  # Initializes a matrix identical to the one provided.
       UpperCAmelCase			:				str										=					arg
       UpperCAmelCase			:				Optional[Any]										=					len(__A		)
     else:  # Initializes a square matrix of the given size and set values to zero.
       UpperCAmelCase			:				List[str]										=					arg
       UpperCAmelCase			:				List[Any]										=					[[0 for _ in range(self.n		)] for _ in range(self.n		)]





   def __mul__(				self				:	Dict,						__A				:	List[Any]		):
     UpperCAmelCase			:				Dict										=					Matrix(self.n		)
     for i in range(self.n		):
       for j in range(self.n		):
         for k in range(self.n		):
           matrix.t[i][j] += self.t[i][k] * b.t[k][j]
     return matrix






def      a__	(						UpperCAmelCase				:     List[str]							,					UpperCAmelCase				:     List[Any]     )    ->		str:
  UpperCAmelCase			:				Tuple										=					Matrix([[1, 0], [0, 1]]     )
  while b > 0:
    if b & 1:
      matrix *= a
    a *= a
    b >>= 1
  return matrix

def      a__	(						UpperCAmelCase				:     Any							,					UpperCAmelCase				:     Dict							,					UpperCAmelCase				:     Dict     )    ->		str:
  # Trivial Cases
  if n == 1:
    return fa
  elif n == 2:
    return fa
  UpperCAmelCase			:				List[str]										=					Matrix([[1, 1], [1, 0]]     )
  UpperCAmelCase			:				Union[str, Any]										=					modular_exponentiation(UpperCAmelCase							,					n - 2     )
  return fa * matrix.t[0][0] + fa * matrix.t[0][1]

def      a__	(						UpperCAmelCase				:     Any							,					UpperCAmelCase				:     int							,					UpperCAmelCase				:     List[Any]     )    ->		Optional[Any]:
  # Trivial Cases
  if n == 1:
    return fa
  elif n == 2:
    return fa

  UpperCAmelCase			:				str										=					fa
  UpperCAmelCase			:				List[str]										=					fa
  n -= 2

  while n > 0:
    UpperCAmelCase					,		UpperCAmelCase			:				str										=					fn_a + fn_a, fn_a
    n -= 1

  return fn_a

def      a__	(						)    ->		Any:
  UpperCAmelCase			:				int										=					'''
from random import randint
from __main__ import fibonacci_with_matrix_exponentiation
'''
  UpperCAmelCase			:				Dict										=					'''fibonacci_with_matrix_exponentiation(randint(1,70000), 1, 1)'''
  UpperCAmelCase			:				Tuple										=					timeit.timeit(setup=UpperCAmelCase							,					stmt=UpperCAmelCase							,					number=100     )
  print('''With matrix exponentiation the average execution time is '''							,					exec_time / 100     )
  return exec_time

def      a__	(						)    ->		int:
  UpperCAmelCase			:				str										=					'''
from random import randint
from __main__ import simple_fibonacci
'''
  UpperCAmelCase			:				List[str]										=					'''simple_fibonacci(randint(1,70000), 1, 1)'''
  UpperCAmelCase			:				List[str]										=					timeit.timeit(setup=UpperCAmelCase							,					stmt=UpperCAmelCase							,					number=100     )
  print(
      '''Without matrix exponentiation the average execution time is '''							,					exec_time / 100     )
  return exec_time

def      a__	(						)    ->		List[str]:
  matrix_exponentiation_time()
  simple_fibonacci_time()


if __name__ == "__main__":
     main()





