Given an array A on size N, you need to find the number of ordered pairs (i,j) such that i<j and A[i]>A[j].
Input:
First line contains one integer, N, size of array.
Second line contains N space separated integers denoting the elements of the array A.
Output:
Print the number of ordered pairs (i,j) such that i<j and A[i]>A[j].
Constraints:
1≤N≤106
1≤A[i]≤106
In the sample test case, the 3 ordered pairs will be (2,3), (2,4) and (3,4).
2<3 but A[2]>A[3]
2<4 but A[2]>A[4]
3<4 but A[3]>A[4]