Given an array with length n a1, a2, ... , an. Answer the number of pairs (i, j) satisfying:
The first line contains one integer n, the length of array.
The next line contains n integers a1, a2, ... , an.
Output one integer, the number of pairs that satisfy the condition above.
Remember to print a ‘\n’ at the end of the output.