#pragma GCC optimize(3)
#include<bits/stdc++.h>
#define int long long
#define endl '\n'
#define ios ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
#define pb push_back 	#define po pop_back
#define YES cout<<"YES\n" 	#define Yes cout<<"Yes\n"   #define NO cout<<"NO\n"	 #define No cout<<"No\n"
#define for00 for(int i=1;i<=n;i++) cin>>a[i];
#define for0 for(int i=0;i<n;i++)
#define for1 for(int i=1;i<=n;i++)
#define for2(i,a,b) for(int i=a; i<=b;i++)
#define for3(i,a,b) for(int i=a; i>=b;i--)
#define cn change_number_tostring    
#define cs change_string_tonumber   
#define pri init_prime_distance
#define all(a) begin(a), end(a)
#define SUM(a) accumulate(all(a), 0LL)
#define MIN(a) (*min_element(all(a)))
#define MAX(a) (*max_element(all(a)))
#define lb(a, x) distance(begin(a), lower_bound(all(a), (x)))
#define ub(a, x) distance(begin(a), upper_bound(all(a), (x)))
#define gcd __gcd
#define debug(x) cout<<"x="<<x<<endl
using namespace std;

const int N = 2e5+10;
inline string change_number_tostring(int i) {  stringstream ss; ss<<i; return ss.str();  }
inline int change_string_tonumber(string s) {  int num; stringstream ss(s);  ss>>num; return num;  }
map<pair<int,int>,int> mp;
int ans;
struct ss{
	int x,y;
}a[N];
set<pair<int,int>> s;
void solve()
{
	int n; cin>>n;
	for(int i=1;i<=n;i++)
	{
		int x; cin>>x;
		a[i].x = x/100;
		a[i].y = x%100;
		mp[{a[i].x%2,a[i].y}]++;
		s.insert({a[i].x%2,a[i].y});
	}
	for(int i=1;i<=n;i++)
	{
		pair<int,int> x = {a[i].x%2,a[i].y};
		if(s.find(x)!=s.end())
		{
			if(mp[x]<2)continue;
			else ans+= mp[x]*(mp[x]-1)/2;
			auto q = s.find(x);
			s.erase(q);
		}
	}
	cout<<ans<<endl;
}

signed main()
{
	ios;
	solve();
}


#include <bits/stdc++.h>
using namespace std;

#define rep(i, a, b) for (int i = (int)(a); (i) < (int)(b); (i)++)
#define rrep(i, a, b) for (int i = (int)(b) - 1; (i) >= (int)(a); (i)--)
#define all(v) v.begin(), v.end()

typedef long long ll;
template <class T> using V = vector<T>;
template <class T> using VV = vector<V<T>>;

/* 提出時これをコメントアウトする */
#define LOCAL true

#ifdef LOCAL
#define dbg(x) cerr << __LINE__ << " : " << #x << " = " << (x) << endl
#else
#define dbg(x) true
#endif

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    constexpr char endl = '\n';
    
    ll n;
    cin >> n;
    V<ll> a(n);
    rep(i,0,n) cin >> a[i];

    V<ll> cnt(210);
    rep(i,0,n) {
        cnt[a[i] % 200]++;
    }

    ll ans = 0;
    rep(i,0,200) {
        ll k = cnt[i];
        ans += k * (k - 1) / 2;
    }
    cout << ans << endl;
    
    return 0;
}