Anthony is obsessed with sorting algorithms. After mastering a couple different sorting algorithms, he is now learning how to solve more unconventional sorting problems. Initially, there is an array
Constraints
Subtask 1 [20%]
Subtask 2 [80%]
No additional constraints.
Input Specification
The first line contains the integer
The next line contains
Output Specification
Output the minimum number of operations to make
Sample Input
3
2 2 4
Sample Output
1
Comments