Now input a positive number n,then you can get n numbers from 1 to n,they are all different and they are in a wrong queue,so you should arrangement them from small to large.The condition is that you can only change two adjacent numbers.
You should output the minimum times you make them from small to large.