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