"""simple docstring"""







def 	a__   (		UpperCAmelCase__							:      float      )->						int:
						return int(UpperCAmelCase__      ) if x - int(UpperCAmelCase__      ) >= 0 else int(UpperCAmelCase__      ) - 1


if __name__ == "__main__":
						import doctest

						doctest.testmod()


"""simple docstring"""







def 	a__   (		UpperCAmelCase__							:      list[int]      )->						int:
						UpperCAmelCase__       						=		len(UpperCAmelCase__      )
						if n in (0, 1):
												return 0
						return sum(query * (n - i - 1) for i, query in enumerate(sorted(UpperCAmelCase__      )      )      )


if __name__ == "__main__":
						import doctest

						doctest.testmod()

