You are given a permutation 'S' of [1...N] with one free spot so the total length of the sequence is N+1.
In one move you can swap any element of the permutation with the free spot.
You need to find the min moves to go from 'S' to the sorted sequence of permutation.