#include <bits/stdc++.h>

using namespace std;
using ll = long long;
using vec = vector<ll>;
using mat = vector<vec>;
using pll = pair<ll,ll>;

#define INF (1LL << 60)
#define MOD 1000000007
#define PI 3.14159265358979323846

#define REP(i,m,n) for(ll (i)=(m),(i_len)=(n);(i)<(i_len);++(i))
#define FORR(i,v) for(auto (i):v)
#define ALL(x) (x).begin(), (x).end()
#define PR(x) cout << (x) << endl
#define PS(x) cout << (x) << " "
#define SZ(x) ((ll)(x).size())
#define MAX(a,b) (((a)>(b))?(a):(b))
#define MIN(a,b) (((a)<(b))?(a):(b))
#define REV(x) reverse(ALL((x)))
#define ASC(x) sort(ALL((x)))
#define DESC(x) ASC((x)); REV((x))
#define pb push_back
#define eb emplace_back

int main()
{
    ll N;
    cin >> N;
    map<ll,ll> A;
    REP(i,0,N) {
        ll a;
        cin >> a;
        ++A[a%200];
    }
    
    ll cnt = 0;
    FORR(a,A) cnt += a.second * (a.second - 1) / 2;
    PR(cnt);

    return 0;
}

/*



*/
#include <bits/stdc++.h>
#define int long long
using namespace std;
#define se second
#define fi first
#define M 1e9+7
#define N 1e9

double dp[102][102][102];

void F(){
	int a, b, c;
	cin >> a >> b >> c;
	for(int i = 100; i >= a; i--){
		for(int j = 100; j >= b; j--){
			for(int k = 100; k >= c; k--){
				if(i == 100 || j == 100 || k == 100){
					dp[i][j][k] = 0;
					continue;
				}
				double w = i + j + k, x = i, y = j, z = k;
				dp[i][j][k] += (dp[i+1][j][k] + 1) * x / w;
				dp[i][j][k] += (dp[i][j+1][k] + 1) * y / w;
				dp[i][j][k] += (dp[i][j][k+1] + 1) * z / w;
			}
		}
	}
	cout << fixed << setprecision(12) << dp[a][b][c];
}

signed main() {
	int T = 1;
	//cin >> T;
	for(int X = 1; X <= T; X++){
		F();
	}
}