
def 		UpperCamelCase    (					_UpperCAmelCase     :      int     )      -> int:






						'''simple docstring'''

						return n * (2 * n - 1)



def 		UpperCamelCase    (					_UpperCAmelCase     :      int     )      -> bool:






						'''simple docstring'''

						_lowercase					:  Union[str, Any]    			=      (1 + 24 * n) ** 0.5
						return ((1 + root) / 6) % 1 == 0



def 		UpperCamelCase    (					_UpperCAmelCase     :      int = 144     )      -> int:






						'''simple docstring'''

						_lowercase					:  Tuple    			=      start
						_lowercase					:  Optional[int]    			=      hexagonal_num(_UpperCAmelCase     )
						while not is_pentagonal(_UpperCAmelCase     ):
												n += 1
												_lowercase					:  Optional[Any]    			=      hexagonal_num(_UpperCAmelCase     )
						return num


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






import os



def 		UpperCamelCase    (					)      -> Optional[int]:






						'''simple docstring'''

						_lowercase					:  Tuple    			=      0
						_lowercase					:  List[Any]    			=      0
						with open(os.path.dirname(_UpperCAmelCase     ) + "/p022_names.txt"     ) as file:
												_lowercase					:  Any    			=      str(file.readlines()[0]     )
												_lowercase					:  int    			=      name.replace("\""   , ""     ).split(","     )

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


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




