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