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