
"""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"""





import math
from timeit import timeit







def       __a	(						__lowerCamelCase    ):
   UpperCAmelCase_   :   Tuple     	=       0
   UpperCAmelCase_   :   Any     	=       abs(__lowerCamelCase    )
   while True:
      UpperCAmelCase_   :   Optional[int]     	=       n // 10
      digits += 1
      if n == 0:
         break
   return digits







def       __a	(						__lowerCamelCase    ):
   return 1 if n == 0 else math.floor(math.log(abs(__lowerCamelCase    ),						10    ) + 1    )







def       __a	(						__lowerCamelCase    ):
   return len(str(abs(__lowerCamelCase    )    )    )







def       __a	(						):
   from collections.abc import Callable

   def benchmark_a_function(__lowerCamelCase,						__lowerCamelCase    ) -> None:
      UpperCAmelCase_   :   Optional[Any]     	=       f"""{func.__name__}({value})"""
      UpperCAmelCase_   :   Optional[int]     	=       timeit(f"""__main__.{call}""",						setup="import __main__"    )
      print(f"""{call}: {func(__lowerCamelCase    )} -- {timing} seconds"""    )

   for value in (26_2144, 1125_8999_0684_2624, 126_7650_6002_2822_9401_4967_0320_5376):
      for func in (num_digits, num_digits_fast, num_digits_faster):
         benchmark_a_function(__lowerCamelCase,						__lowerCamelCase    )
      print()


if __name__ == "__main__":
    import doctest

    doctest.testmod()
    benchmark()


