#include <bits/stdc++.h>
using namespace std;
struct p {
  long long int pl;
  long long int mi;
};
int main() {
  int n, k;
  cin >> n;
  vector<p> a(11);
  for (int i = 0; i < 11; ++i) a[i].mi = a[i].pl = 0;
  for (int i = 0; i < n; ++i) {
    cin >> k;
    if (k >= 0)
      ++a[k].pl;
    else
      ++a[-k].mi;
  }
  long long int s = (a[0].pl * (a[0].pl - 1)) / 2;
  for (int i = 1; i < 11; ++i) s += a[i].pl * a[i].mi;
  cout << s;
}
