You are given an array A containing N elements. You need to make the elements of the array equal. You are allowed to do the following operations:
You need to find the minimum number of operations required to do so.
Input Format
Output Format
Constraints
We can decrease the 3rd element by 1 and all elements become same. Hence, answer is 1.