Given a permutation of the integers to , print out the number of inversions in the array.
An inversion is defined as a pair of indices, such that .
The first line will contain the integer .
The second line will contain integers, .
It is guaranteed the second line will contain a valid permutation of the integers from to .
Output the number of inversions in the permutation.
4 3 2 1 4