#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<long long> input(21);
  int i, j;
  for (i = 0; i < n; i++) {
    int r;
    cin >> r;
    input[r + 10]++;
  }
  long long result = 0;
  i = 0;
  j = 20;
  while (i < j) {
    result += input[i] * input[j];
    i++;
    j--;
  }
  result += input[10] * (input[10] - 1) / 2;
  cout << result << endl;
  return 0;
}
