#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, s = 0, x, t[40] = {};
  cin >> n;
  for (int i = 0; i < n; ++i) {
    cin >> x;
    ++t[x + 10];
  }
  for (int i = -10; i < 1; ++i) {
    if (i != 0) {
      s += t[i + 10] * t[-i + 10];
    } else {
      s += (t[i + 10] * (t[i + 10] - 1)) / 2;
    }
  }
  cout << s << '\n';
}
