The array is sorted using the selection sort method in ascending order. How many times does the first element in the original array change its position?
The first line contains the number of elements in the array (1 \leq n \leq 1000). The second line contains the array itself. It is guaranteed that all array elements are different and their absolute value does not exceed 10^9.
Print the number of movements of the first element.
Example 1
Example 2
Example 3