#include <bits/stdc++.h>
using namespace std;
int n;
long long s[50];
int main() {
  scanf("%d", &n);
  memset(s, 0, sizeof(s));
  for (int i = 0; i < n; ++i) {
    int t;
    scanf("%d", &t);
    s[t + 10]++;
  }
  long long ans = s[10] * (s[10] - 1) / 2;
  for (int i = 0; i < 10; ++i) {
    ans += s[i] * s[20 - i];
  }
  printf("%I64d\n", ans);
  return 0;
}
