PROGRAMMING:How many exchanges are needed
There is a sequence of N integers. All you have to do is exchange the positions of the two integers until the whole sequence is arranged in ascending order. How many times do you need to exchange this sequence of integers for bubble sorting? For example, 1,2,3,5,4, we only need to exchange 4 and 5 once.
###Input format:
In the first line, enter n (n < = 32767), and in the second line, enter n integers in turn
###Output format:
For each group of inputs, output the number of exchanges in a row. All output is completed in one line, with no extra space and line feed at the end of the line
###Input example:
```in
Here is a set of inputs. For example:
five
1 2 3 5 4
```
###Output example:
```out
The corresponding output is given here. For example:
one
```
answer:If there is no answer, please comment
###Input format:
In the first line, enter n (n < = 32767), and in the second line, enter n integers in turn
###Output format:
For each group of inputs, output the number of exchanges in a row. All output is completed in one line, with no extra space and line feed at the end of the line
###Input example:
```in
Here is a set of inputs. For example:
five
1 2 3 5 4
```
###Output example:
```out
The corresponding output is given here. For example:
one
```
answer:If there is no answer, please comment