#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  long long in[25];
  int tmp;
  cin >> n;
  for (int i = 0; i <= 20; i++) in[i] = 0;
  for (int i = 0; i < n; i++) {
    cin >> tmp;
    in[tmp + 10]++;
  }
  long long total = 0;
  long long r;
  for (int i = 0; i < 10; i++) {
    r = in[i] * in[20 - i];
    total += r;
  }
  if (in[10] > 0) in[10]--;
  r = (1 + in[10]) * in[10] / 2;
  total += r;
  cout << total << "\n";
  return 0;
}
