You are given an array of n integers. You want to modify the array so that it is strictly increasing, i.e., every element is larger than previous element.
On each move, you can increase the value of any element by one. What is the minimum number of moves required?
Constraints
1 ≤ n ≤ 2*105
1 ≤ a[i] ≤ 109
Input
First line contains one integer n - size of the array.
Second line contains n space separated integers a1,a2,…,an.
Output
Print the number of moves required to make the array strictly increasing.
We have to convert 4 to 8, 1 to 9, 2 to 10. So answer will be 4+8+8=20.