#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n;
  long long c0 = 0, c_1 = 0, c1 = 0;
  cin >> n;
  long long pos[11] = {0}, neg[11] = {0};
  for (long long i = 0; i < n; i++) {
    long long h;
    cin >> h;
    if (h == 0)
      c0++;
    else if (h < 0)
      neg[abs(h)]++;
    else
      pos[h]++;
  }
  long long ans = c0 * (c0 - 1);
  ans /= 2;
  for (long long i = 1; i < 11; i++) ans += (pos[i] * neg[i]);
  cout << ans << endl;
}
