#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, z;
  long long c = 0;
  map<long long, long long> x;
  cin >> n;
  while (n--) cin >> z, x[z]++;
  for (int i = 1; i < 11; i++) c += x[i] * x[-i];
  c += (x[0] * (x[0] - 1)) / 2;
  cout << c << endl;
  return 0;
}
