


"""simple docstring"""



def     UpperCAmelCase    (					_lowercase   :      float  )	->   int:


	"""simple docstring"""




	return int(_lowercase  ) if x - int(_lowercase  ) >= 0 else int(_lowercase  ) - 1


if __name__ == "__main__":
		import doctest

		doctest.testmod()



"""simple docstring"""



def     UpperCAmelCase    (					_lowercase   :      list[int]  )	->   int:


	"""simple docstring"""




	lowerCAmelCase_			       = len(_lowercase  )
	if n in (0, 1):
		return 0
	return sum(query * (n - i - 1) for i, query in enumerate(sorted(_lowercase  )  )  )


if __name__ == "__main__":
		import doctest

		doctest.testmod()