Given integers a_1, a_2, \ldots, a_n.
Compute the value of the sum:
that is, the sum of absolute differences over all pairs of indices such that 1 \le i < j \le n.
The first line contains a single integer n~(2 \le n \le 2 \times 10^5).
The second line contains integers a_1, a_2, \ldots, a_n~(\lvert a_i \rvert \le 10^8).
Print a single integer — the required sum.
Example 1
Example 2