#include <bits/stdc++.h>
using namespace std;
long long cntPlus[11], cntMinus[11];
int main() {
  long long n, t, ans;
  cin >> n;
  for (int i = 0; i < n; ++i) {
    cin >> t;
    if (t >= 0)
      ++cntPlus[t];
    else
      ++cntMinus[-t];
  }
  ans = cntPlus[0] * (cntPlus[0] - 1) / 2;
  cntPlus[0] = 0;
  for (int i = 0; i < 11; ++i) ans += cntPlus[i] * cntMinus[i];
  cout << ans;
  return 0;
}
