





"""simple docstring"""






import math






def      lowercase__ (					lowerCAmelCase__   :			int			)    ->			bool:



			'''simple docstring'''
			return math.sqrt(lowerCAmelCase__			) * math.sqrt(lowerCAmelCase__			) == num






def      lowercase__ (					lowerCAmelCase__   :			int			)    ->			bool:



			'''simple docstring'''
			a__  :	Optional[Any]		 =			0
			a__  :	List[Any]		 =			n
			while left <= right:
						a__  :	int		 =			(left + right) // 2
						if mid**2 == n:
									return True
						elif mid**2 > n:
									a__  :	Dict		 =			mid - 1
						else:
									a__  :	List[Any]		 =			mid + 1
			return False


if __name__ == "__main__":
		import doctest

		doctest.testmod()






"""simple docstring"""






import os






def      lowercase__ (					)    ->			Optional[Any]:



			'''simple docstring'''
			with open(os.path.dirname(lowerCAmelCase__			) + "/p022_names.txt"			) as file:
						a__  :	Optional[int]		 =			str(file.readlines()[0]			)
						a__  :	Optional[int]		 =			names.replace("\""							,			""			).split(","			)

			names.sort()

			a__  :	int		 =			0
			a__  :	Dict		 =			0

			for i, name in enumerate(lowerCAmelCase__			):
						for letter in name:
									name_score += ord(lowerCAmelCase__			) - 6_4

						total_score += (i + 1) * name_score
						a__  :	Tuple		 =			0
			return total_score


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