#include <bits/stdc++.h>
using namespace std;
long long a[11], b[11];
int main() {
  int n;
  long long c = 0;
  cin >> n;
  for (int i = 0; i < n; i++) {
    int h;
    cin >> h;
    if (h >= 0)
      a[h]++;
    else
      b[-h]++;
  }
  for (int i = 1; i < 11; i++) c += a[i] * b[i];
  c += (a[0] * (a[0] - 1) / 2);
  cout << c << endl;
  return 0;
}
