#include<bits/stdc++.h>
using namespace std;
int main(){
  int n;
  vector<int> v;
  vector<bool> vis;
  
  cin >> n;
  vis.assign(n , false);
  v.assign(n, 0);
  
  int input;
  for(int i = 0; i < n; i++)
  {
    cin >> input;
    v[i] = input;
  }
  
  long long int count = 0;
  
  for(int i = 0; i < n; i++)
  {
    if(vis[i] == true){
      continue;
    }
    
    vis[i] = true;
    long long int temp = 1;
    for(int j = i + 1; j < n; j++){
      
      if(vis[j] == true){
        continue;
      }
      
      int diff = abs(v[i] - v[j]);
      if(diff % 200 == 0){
        temp++;
        vis[j] = true;
      }
    }
    
    count += (temp * (temp - 1)) / 2;
  }
  
  cout << count;
}
#include <bits/stdc++.h>
using namespace std;
 
int main() {
    int N;
    cin >> N;
    int ans = 0;
    
    for (int i = 0; i<N; i++) {
        int A=0;
        cin >> A;
        if (A > 10) {
            ans = ans + A - 10;
        }
    }
    
    cout << ans << endl;
}