#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, var, couples, ar[22] = {0};
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> var;
    if (var >= 0) {
      ar[var]++;
    } else {
      ar[10 - var]++;
    }
  }
  couples = (ar[0] * (ar[0] - 1)) / 2;
  for (int i = 1; i < 11; i++) {
    couples += ar[i] * ar[10 + i];
  }
  cout << couples << '\n';
  return 0;
}
