#include <iostream>
#include <algorithm>
#include <cmath>
#include <limits>
#include <iomanip>
#include <vector>
#include <cstring>
#include <queue>
#include <deque>
#include <map>
#include <set>
#include <numeric>
#include <unordered_map>
#include <unordered_set>
typedef long long ll;
typedef long double ld;
#define rep(i,n) for(int i=0;i<n;i++)
#define rep1(i,n) for(int i=1;i<=n;i++)
#define rrep(i,n) for(int i=n-1;i>=0;i--)
#define REP(i,L,R) for(int i=L;i<R;i++)
using namespace std;
typedef vector<vector<int>> Graph;

//decralation

//struct area

// Erathostenes's sieve



//main area
int main(){
    ll N;
    cin >> N;
    vector<ll> A(N);
    rep(i,N) cin >> A[i];
    vector<ll> cnt(200,0);
    rep(i,N) cnt[(A[i])%200]++;
    ll ans = 0;
    rep(i,200){
        ans += cnt[i]*(cnt[i]-1)/2;
    }
    cout << ans << endl;
}
/*



*/
    #include <bits/stdc++.h>
    #include <strings.h>
     
    using namespace std;
     
    int main(){
        string question, no_rev;
        char this_char, prev_char;
        int i = 0, rev;
       
        cin >> question;
        rev = -1;
        while((this_char = question[i++]) != '\0'){
            if(this_char == 'R'){
                rev *= -1;
            } else if (rev == -1) {
                no_rev.push_back(this_char);
            } else {
                no_rev.insert(0, 1, this_char);
            }
        }
     
        if(rev == 1){
            reverse(no_rev.begin(),no_rev.end());
        }
     
        i = 0;
        prev_char = '\0';
        string answer;
        while((this_char = no_rev[i++]) != '\0'){
            if(this_char == prev_char){
                answer.pop_back();
            } else {
                answer.push_back(this_char);
            }
            prev_char = answer[answer.length() - 1];
        }
        cout << answer << '\n';
    }