#include<bits/stdc++.h>
using namespace std;
 
#define rapid() ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define endl '\n'
#define inf 1e36
#define pb push_back
#define mp make_pair
#define fraction() cout.unsetf(ios::floatfield); cout.precision(10); cout.setf(ios::fixed,ios::floatfield);

typedef long long ll;

const ll dp=1e9+7;

int main(){
  rapid();
  //freopen("input.txt","r",stdin); 
  //freopen("output.txt","w",stdout);
  ll n,cnt=0;
  cin>>n;
  vector<ll>vec(n);
  map<ll,ll>m;
  for(int i=0;i<n;i++){
  	cin>>vec[i];
  	m[vec[i]%200]++;
  }
  for(auto u:m){
  	cnt+=(u.second*(u.second-1))/2;
  }
  cout<<cnt<<endl;
  return 0;
}

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

#define REP(i,n) for(int i=0;i<(int)(n);i++)
#define REP1(i,a,b) for(int i=a;i<=(int)b;i++)
#define ll long long int
#define ld long double
#define nl endl
#define s(a) scanf("%d",&a)
#define p(a) printf("%d",a);
#define pb push_back

const double PI=acos(-1.0);

int main()
{
   #ifndef ONLINE_JUDGE
   freopen("F:/bla bla bal/sublime/input.txt","r",stdin);
   freopen("F:/bla bla bal/sublime/output.txt","w",stdout);
   #endif 
   
  int n;cin>>n;
  int a[1001];
  int s=0;
  REP(i,n){
    cin>>a[i];
    if(a[i]>10)s+=(a[i]-10);
  }
  cout<<s<<nl;




   return 0;

}