Given a permutation of the first
Constraints
Input Specification
The first line of the input consists of a single integer,
The next line contains
Output Specification
Output, on a single line, the minimum number of swaps needed.
Sample Input
Copy
3
2 1 3
Sample Output
Copy
2
Comments