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 input | standard output |
|---|
| 3
1 2 3
| 0
|
| 3
10 10 10
| 24
|