Problem J. 26. Maximum difference score
Input file name: standard input
Output file name: standard output
Time limit: 1 s
Memory limit: 1024 MB
You are given an array A of N integers. You can rearrange the elements in any order. The score of the sequence is defined as
\sum_{i=1}^{N} (A_i - i)
What is the maximum possible score you can achieve?

Input

The first line contains an integer N (1 \le N \le 10^{5}). The second line contains N integers A_i (1 \le A_i \le 10^{6}).

Output

Output the maximum possible score.

Examples

standard inputstandard output
3 1 2 3 0
3 10 10 10 24