#include <bits/stdc++.h>
using namespace std;
long long n, q, ar[200], ans;
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> q;
    ar[10 + q]++;
  }
  for (int j = -10; j <= 10; ++j) {
    if (j == 0)
      ans += ar[j + 10] * (ar[j + 10] - 1);
    else
      ans += ar[j + 10] * ar[-j + 10];
  }
  cout << ans / 2 << endl;
  cin.get();
  cin.get();
  return 0;
}
