#774. Swaps in selection sort
In selection sort, for each i find the smallest (first) element of the remaining part, and swap it with position i if it is at a different position. How many swaps are made?
### Input
The first line has n, the second line has n integers separated by spaces.
### Output
A number.
Examples
Input
5 22 2 19 27 5
Output
3
Input
2 6 21
Output
0
💡 You can solve it with Python, JavaScript or blocks. Read the input line by line with input(). Don't print a question (like input("Number: ")). Print exactly what the output asks for, nothing more.