#include <bits/stdc++.h>
using namespace std;
long long pnums[20];
long long nnums[20];
long long zeros;
int n;
int main() {
  zeros = 0;
  memset(pnums, 0, sizeof(pnums));
  memset(nnums, 0, sizeof(nnums));
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) {
    int t;
    scanf("%d", &t);
    if (t == 0)
      zeros++;
    else if (t > 0)
      pnums[t]++;
    else
      nnums[-t]++;
  }
  long long ans = zeros * (zeros - 1) / 2;
  for (int i = 1; i <= 10; ++i) ans += pnums[i] * nnums[i];
  cout << ans << endl;
  return 0;
}
