#include <bits/stdc++.h>
using namespace std;
unsigned long long flag[21];
unsigned long long n, ans = 0;
unsigned long long jc(unsigned long long n, unsigned long long m) {
  unsigned long long i, ans = 1;
  for (i = m + 1; i <= n; i++) {
    ans *= i;
  }
  return ans;
}
int main(void) {
  memset(flag, 0, sizeof(flag));
  cin >> n;
  unsigned long long i;
  for (i = 0; i < n; i++) {
    unsigned long long a;
    cin >> a;
    flag[a + 10]++;
  }
  for (i = 0; i <= 10; i++) {
    if (i == 10) {
      if (flag[10] <= 1) continue;
      ans += jc(flag[i], flag[i] - 2) / 2;
      continue;
    }
    ans += flag[i] * flag[20 - i];
  }
  cout << ans << endl;
  return 0;
}
