#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int n = 0;
  cin >> n;
  map<int, int> m;
  map<int, int>::iterator it;
  int t;
  for (int i = 0; i < n; i++) {
    cin >> t;
    m[t]++;
  }
  unsigned long long int d = 0;
  for (it = m.begin(); it != m.end(); it++) {
    int r = it->first;
    if (r != 0) {
      int c1 = m[r];
      int c2 = m[-r];
      d += (long long int)c1 * c2;
      m[-r] = 0;
      m[r] = 0;
    } else if (m[r] != 0) {
      d += (long long int)((long long int)m[r] * (m[r] - 1)) / 2;
      m[r] = 0;
    }
  }
  cout << d << endl;
  return 0;
}
