You are given an array integer A of length n. Find the number of pairs (i,j) that Ai=Aj and i≠j.
- The first line contains an integer n.
- The second line contains n integers Ai.
Output
- One integer is the number of pairs you found.
Constraints
- 1≤n≤105.
- 1≤Ai≤105.
Example
Input:
5
1 2 2 1 1
Output:
4