B. Random Array
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

You are given an array of positive integers of length $$$n$$$.

You need to find a value $$$x$$$ such that sum of $$$|a_i - x - i|$$$ over all $$$1 \le i \le n$$$ is minimized (This is declared as the $$$summation$$$ of the array).

Now your task is to print the minimum $$$summation$$$.

Input

In the first line of input You'll be given a number $$$n$$$ which shows the length of the array.

In the second line You'll receive an array $$$a$$$ of positive integers.

$$$1 \le n \le 10^5$$$.

$$$1 \le a_i \le 10^9$$$.

Output

Print the minimum $$$summation$$$ possible.

Example
Input
5
2 3 4 6 8
Output
3