#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  while (1 == scanf("%d", &N)) {
    map<int, long long> ma;
    for (int i = 0; i < (int)(N); i++) {
      int x;
      scanf("%d", &x);
      ++ma[x];
    }
    long long a = ma[0] * (ma[0] - 1) / 2;
    for (int i = 1; i <= 100; ++i) a += ma[i] * ma[-i];
    cout << a << endl;
  }
  return 0;
}
