#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  long long a[21] = {0};
  int num;
  cin >> n;
  while (n--) {
    cin >> num;
    if (num > 0)
      a[num + 10]++;
    else
      a[-(num)]++;
  }
  long long int count = 0;
  for (int i = 1, j = 11; i < 11 && j < 21; i++, j++) {
    count += a[i] * a[j];
  }
  count += (a[0]) * (a[0] - 1) / 2;
  cout << count;
  return 0;
}
